diff --git a/README.md b/README.md index cb5f3f2..2379998 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -npmFrog -====== +# npmFrog A nice npmjs.org-like web interface for jFrog Artifactory diff --git a/pm2.config.js b/pm2.config.js index 5c476b7..fde1705 100644 --- a/pm2.config.js +++ b/pm2.config.js @@ -1,5 +1,5 @@ const env_local = { - "MOCK": true, + MOCK: true }; module.exports = { @@ -7,27 +7,27 @@ module.exports = { name: "frog-ui", script: "./node_modules/@vue/cli-service/bin/vue-cli-service.js", args: "serve", - env_local, + env_local }, compileServer: { name: "frog-compile-server", script: "./node_modules/typescript/bin/tsc", cwd: "server", args: "--watch", - env_local, + env_local }, runServer: { name: "frog-server", script: "index.js", cwd: "dist/server/", - env_local, + env_local }, serveUIStatic: { name: "frog-ui-static", script: "serve", env: { PM2_SERVE_PATH: "dist/webui", - PM2_SERVE_PORT: 8000, - }, + PM2_SERVE_PORT: 8000 + } } -} +}; diff --git a/pm2.dev.config.js b/pm2.dev.config.js index b242b61..9a49416 100644 --- a/pm2.dev.config.js +++ b/pm2.dev.config.js @@ -1,12 +1,8 @@ -const tasks = require('./pm2.config'); +const tasks = require("./pm2.config"); const runServer = tasks.runServer; runServer.watch = true; module.exports = { - apps: [ - tasks.compileServer, - tasks.watchUI, - runServer, - ] + apps: [tasks.compileServer, tasks.watchUI, runServer] }; diff --git a/pm2.prod.config.js b/pm2.prod.config.js index a87e61b..edbc399 100644 --- a/pm2.prod.config.js +++ b/pm2.prod.config.js @@ -1,8 +1,5 @@ -const tasks = require('./pm2.config'); +const tasks = require("./pm2.config"); module.exports = { - apps: [ - tasks.runServer, - tasks.serveUIStatic, - ] + apps: [tasks.runServer, tasks.serveUIStatic] }; diff --git a/server/artifactory-service.ts b/server/artifactory-service.ts index 5cdc342..7723ab0 100644 --- a/server/artifactory-service.ts +++ b/server/artifactory-service.ts @@ -60,28 +60,41 @@ function readMainCode(storageDir): string { function fetchPackages(): AxiosPromise { if (process.env.MOCK) { return new Promise((resolve, reject) => { - resolve(createAxiosResponse(fs.readJSONSync(path.join(__dirname, 'mock', 'packages-all.json')))); + resolve( + createAxiosResponse( + fs.readJSONSync(path.join(__dirname, 'mock', 'packages-all.json')), + ), + ); }); } - return (axios.get(`/-/all`)); + return axios.get(`/-/all`); } -async function getPackageDetail({ scope, packageName }): Promise { +async function getPackageDetail({ + scope, + packageName, +}): Promise { const latestVersionResponse = await getDistTags({ scope, packageName }); const latestVersion = latestVersionResponse.data.latest; const key = `${scope}-${packageName}-${latestVersion}`; const packageDetailResonse: AxiosResponse = process.env.MOCK ? await new Promise((resolve, reject) => { - const packageResource = path.join(__dirname, 'mock', `${packageName}.json`); - let data; - try { - data = fs.readJSONSync(packageResource); - } catch (error) { - data = fs.readJSONSync(path.join(__dirname, 'mock', 'fractal-menu-enhancer.json')); - } - resolve(createAxiosResponse(data)); - }) + const packageResource = path.join( + __dirname, + 'mock', + `${packageName}.json`, + ); + let data; + try { + data = fs.readJSONSync(packageResource); + } catch (error) { + data = fs.readJSONSync( + path.join(__dirname, 'mock', 'fractal-menu-enhancer.json'), + ); + } + resolve(createAxiosResponse(data)); + }) : packageDetailCache[key] ? await new Promise((resolve, reject) => { resolve(createAxiosResponse(packageDetailCache[key])); @@ -90,12 +103,18 @@ async function getPackageDetail({ scope, packageName }): Promise const additionalCode = process.env.MOCK ? await new Promise((resolve) => { - const packageResource = path.join(__dirname, 'mock', `${packageName}.readme.md`); + const packageResource = path.join( + __dirname, + 'mock', + `${packageName}.readme.md`, + ); let data; try { data = readme2Html(packageResource); } catch (error) { - data = readme2Html(path.join(__dirname, 'mock', 'fractal-menu-enhancer.readme.md')); + data = readme2Html( + path.join(__dirname, 'mock', 'fractal-menu-enhancer.readme.md'), + ); } resolve({ readme: data, @@ -105,7 +124,12 @@ async function getPackageDetail({ scope, packageName }): Promise : await new Promise(async (resolve, reject) => { const packageDetail = packageDetailResonse.data; const downloadUrl = packageDetail.versions[latestVersion].dist.tarball; - const storageDir = path.join(tmpDir, scope || '', packageName, latestVersion); + const storageDir = path.join( + tmpDir, + scope || '', + packageName, + latestVersion, + ); if (fs.existsSync(storageDir)) { resolve(readAdditionalCode(storageDir)); } else { @@ -122,7 +146,10 @@ async function getPackageDetail({ scope, packageName }): Promise // Store package in filesystem: .then((result) => { fs.ensureDirSync(storageDir); - const outputFilename = path.join(storageDir, `${packageName}-${latestVersion}.tar.gz`); + const outputFilename = path.join( + storageDir, + `${packageName}-${latestVersion}.tar.gz`, + ); fs.writeFileSync(outputFilename, result.data); return outputFilename; }) @@ -166,9 +193,11 @@ function readAdditionalCode(storageDir) { function getDistTags({ scope, packageName }): AxiosPromise { return process.env.MOCK ? new Promise((resolve, reject) => { - resolve(createAxiosResponse({ - latest: '1.1.0', - })); + resolve( + createAxiosResponse({ + latest: '1.1.0', + }), + ); }) : axios.get(`/-/package/${name2url({ scope, packageName })}/dist-tags`); } diff --git a/server/index.ts b/server/index.ts index 8358cb5..48b0613 100644 --- a/server/index.ts +++ b/server/index.ts @@ -14,48 +14,59 @@ app.use(bodyParser.json()); app.use(cors()); function handleError(error, targetResponse, msg) { - targetResponse.status(500).send(`Error: ${msg} Please verify your server settings.\n\n${error}`); + targetResponse + .status(500) + .send(`Error: ${msg} Please verify your server settings.\n\n${error}`); } app.get('/packages', (req, res) => { - artifactoryService.fetchPackages().then((response) => { - res.send(response.data); - }).catch((error) => { - handleError(error, res, `Could not get packagages from ${artifactoryService.baseURL}.`); - }); + artifactoryService + .fetchPackages() + .then((response) => { + res.send(response.data); + }) + .catch((error) => { + handleError( + error, + res, + `Could not get packagages from ${artifactoryService.baseURL}.`, + ); + }); }); app.get('/package/:scope?/:packageName/dist-tags', (req, res) => { - artifactoryService.getDistTags(req.params).then((response) => { - res.send(response.data); - }).catch((error) => { - handleError( - error, - res, - `Could not get dist-tags for package "${ - req.params.scope}/${req.params.packageName - } - " from ${ - artifactoryService.baseURL - }.`); - }); + artifactoryService + .getDistTags(req.params) + .then((response) => { + res.send(response.data); + }) + .catch((error) => { + handleError( + error, + res, + `Could not get dist-tags for package "${req.params.scope}/${ + req.params.packageName + } + " from ${artifactoryService.baseURL}.`, + ); + }); }); app.get('/packageDetail/:scope?/:packageName', (req, res) => { - artifactoryService.getPackageDetail(req.params).then((response) => { - res.send(response.data); - }).catch((error) => { - handleError( - error, - res, - `Could not get package details for package "${ - req.params.scope - }/${ - req.params.packageName - }" from ${ - artifactoryService.baseURL - }.`); - }); + artifactoryService + .getPackageDetail(req.params) + .then((response) => { + res.send(response.data); + }) + .catch((error) => { + handleError( + error, + res, + `Could not get package details for package "${req.params.scope}/${ + req.params.packageName + }" from ${artifactoryService.baseURL}.`, + ); + }); }); app.get('/config', (req, res) => { diff --git a/server/tsconfig.json b/server/tsconfig.json index b42c10d..3dd82a8 100644 --- a/server/tsconfig.json +++ b/server/tsconfig.json @@ -5,15 +5,8 @@ "noImplicitAny": false, "module": "commonjs", "target": "es5", - "lib": [ - "es5", - "es2015", - "dom", - "scripthost", - ] + "lib": ["es5", "es2015", "dom", "scripthost"] }, - "include": [ - "**/*.ts", - ], + "include": ["**/*.ts"], "exclude": ["node_modules", "**/*.spec.ts"] } diff --git a/src/App.vue b/src/App.vue index 98855cd..da6e4ec 100644 --- a/src/App.vue +++ b/src/App.vue @@ -46,7 +46,7 @@ > npmFrog {{title}} - + diff --git a/src/components/CodeBlock.vue b/src/components/CodeBlock.vue index cef5360..c3222b7 100644 --- a/src/components/CodeBlock.vue +++ b/src/components/CodeBlock.vue @@ -60,7 +60,6 @@ export default class CodeBlock extends Vue { diff --git a/src/components/LoadingSpinner.vue b/src/components/LoadingSpinner.vue index 690e8ad..7f8cc12 100644 --- a/src/components/LoadingSpinner.vue +++ b/src/components/LoadingSpinner.vue @@ -56,6 +56,6 @@ export default class LoadingSpinner extends Vue { diff --git a/src/components/PackageDetailItem.vue b/src/components/PackageDetailItem.vue index a459c6d..22f3441 100644 --- a/src/components/PackageDetailItem.vue +++ b/src/components/PackageDetailItem.vue @@ -50,9 +50,9 @@ export default class PackageDetailItem extends Vue { a:not([href="#"]), .v-avatar { - margin-right: .5em; + margin-right: 0.5em; transition: $transition-smooth; - + &:hover { box-shadow: $shadow-focused; } @@ -62,6 +62,5 @@ export default class PackageDetailItem extends Vue { .full-width { width: 100%; } - diff --git a/src/services/BackendApi.ts b/src/services/BackendApi.ts index f9a731d..6e356bf 100644 --- a/src/services/BackendApi.ts +++ b/src/services/BackendApi.ts @@ -5,7 +5,6 @@ import { IPackageJSON } from '../../types/package-json'; import Config from '../../types/Config'; export default class BackendApi { - private static instance: BackendApi; private axios: AxiosInstance; private baseURL: string; @@ -29,7 +28,10 @@ export default class BackendApi { return this.get('config'); } - public getPackageDetail({scope, packageName}): AxiosPromise { + public getPackageDetail({ + scope, + packageName, + }): AxiosPromise { return this.get(`packageDetail/${scope ? `${scope}/` : ''}${packageName}`); } @@ -40,5 +42,4 @@ export default class BackendApi { private get(route: string): AxiosPromise { return this.axios.get(route); } - } diff --git a/src/services/DataStore.ts b/src/services/DataStore.ts index f4f4e74..68341bb 100644 --- a/src/services/DataStore.ts +++ b/src/services/DataStore.ts @@ -30,9 +30,9 @@ export default class DataStore { private crafterList!: Crafter[]; private packageDetails!: { [packageName: string]: { - packageDetail: Package, - currentPackage?: Package, - }, + packageDetail: Package; + currentPackage?: Package; + }; }; private metaInfo!: IPackageJSON; private config!: Config; @@ -44,9 +44,12 @@ export default class DataStore { this.packageDetails = {}; } - public async getPackageDetail(packageId: {scope: string, packageName: string}): Promise<{ - packageDetail: Package, - currentPackage?: Package, + public async getPackageDetail(packageId: { + scope: string; + packageName: string; + }): Promise<{ + packageDetail: Package; + currentPackage?: Package; }> { const scope = packageId.scope; const packageName = packageId.packageName; @@ -54,34 +57,36 @@ export default class DataStore { const cachedPackageDetails = this.packageDetails[key]; if (cachedPackageDetails) { return new Promise<{ - packageDetail: Package, - currentPackage?: Package, + packageDetail: Package; + currentPackage?: Package; }>((fulfill) => { fulfill(cachedPackageDetails); }); } return new Promise<{ - packageDetail: Package, - currentPackage?: Package, + packageDetail: Package; + currentPackage?: Package; }>((fulfill) => { - BackendApi.Instance.getPackageDetail({scope, packageName}).then((response) => { - const packageDetail: Package = new Package(response.data); - let currentPackage: Package | undefined; - const currentVersionObject: string | PackageMetaDataDTO = - packageDetail.versions[packageDetail['dist-tags'].latest]; - if (typeof currentVersionObject !== 'string') { - currentPackage = new Package(currentVersionObject); - } - this.packageDetails[key] = { - packageDetail, - currentPackage, - }; - return fulfill(this.packageDetails[key]); - }).catch((error) => { - EventBus.$emit(Errors.SERVER_ERROR, error); - return null; - }); + BackendApi.Instance.getPackageDetail({ scope, packageName }) + .then((response) => { + const packageDetail: Package = new Package(response.data); + let currentPackage: Package | undefined; + const currentVersionObject: string | PackageMetaDataDTO = + packageDetail.versions[packageDetail['dist-tags'].latest]; + if (typeof currentVersionObject !== 'string') { + currentPackage = new Package(currentVersionObject); + } + this.packageDetails[key] = { + packageDetail, + currentPackage, + }; + return fulfill(this.packageDetails[key]); + }) + .catch((error) => { + EventBus.$emit(Errors.SERVER_ERROR, error); + return null; + }); }); } @@ -95,61 +100,76 @@ export default class DataStore { if (this.request) { return this.request; } - return (this.request = BackendApi.Instance.getPackages().then((response) => { - const packagesResponse: PackagesResponse = response.data; + return (this.request = BackendApi.Instance.getPackages() + .then((response) => { + const packagesResponse: PackagesResponse = response.data; - for (const packageName of Object.keys(packagesResponse).filter((key) => !key.startsWith('_'))) { - const modifiedPackage: Package = new Package(packagesResponse[packageName]); - this.packages.push(modifiedPackage); + for (const packageName of Object.keys(packagesResponse).filter( + (key) => !key.startsWith('_'), + )) { + const modifiedPackage: Package = new Package( + packagesResponse[packageName], + ); + this.packages.push(modifiedPackage); - if (modifiedPackage.tags) { - for (const tag of modifiedPackage.tags) { - if (! this.tagList.some((currentTag) => tag.value === currentTag.value)) { - this.tagList.push(tag); + if (modifiedPackage.tags) { + for (const tag of modifiedPackage.tags) { + if ( + !this.tagList.some((currentTag) => tag.value === currentTag.value) + ) { + this.tagList.push(tag); + } } } - } - for (const crafter of modifiedPackage.crafters) { - if (! (this.crafterList.some((currentCrafter) => currentCrafter.equals(crafter)))) { - this.crafterList.push(crafter); + for (const crafter of modifiedPackage.crafters) { + if ( + !this.crafterList.some((currentCrafter) => + currentCrafter.equals(crafter), + ) + ) { + this.crafterList.push(crafter); + } } } - } - return this.packages; - }).catch((error) => { - EventBus.$emit(Errors.SERVER_ERROR, error); - return []; - })); + return this.packages; + }) + .catch((error) => { + EventBus.$emit(Errors.SERVER_ERROR, error); + return []; + })); } - public getConfig(): Promise { + public getConfig(): Promise { if (this.config) { return new Promise((resolve, reject) => { resolve(this.config); }); } - return BackendApi.Instance.getConfig().then((response) => { - this.config = response.data; - return this.config; - }).catch((error) => { - EventBus.$emit(Errors.SERVER_ERROR, error); - return undefined; - }); + return BackendApi.Instance.getConfig() + .then((response) => { + this.config = response.data; + return this.config; + }) + .catch((error) => { + EventBus.$emit(Errors.SERVER_ERROR, error); + return undefined; + }); } - public getMetaInfo(): Promise { + public getMetaInfo(): Promise { if (this.metaInfo) { return new Promise((resolve, reject) => { resolve(this.metaInfo); }); } - return BackendApi.Instance.getMetaInfo().then((response) => { - this.metaInfo = response.data; - return this.metaInfo; - }).catch((error) => { - EventBus.$emit(Errors.SERVER_ERROR, error); - return undefined; - }); + return BackendApi.Instance.getMetaInfo() + .then((response) => { + this.metaInfo = response.data; + return this.metaInfo; + }) + .catch((error) => { + EventBus.$emit(Errors.SERVER_ERROR, error); + return undefined; + }); } - } diff --git a/src/views/PackageDetail.vue b/src/views/PackageDetail.vue index 531ad7f..9741756 100644 --- a/src/views/PackageDetail.vue +++ b/src/views/PackageDetail.vue @@ -376,7 +376,7 @@ export default class PackageDetail extends Vue { diff --git a/tsconfig.json b/tsconfig.json index a33a171..7575956 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,19 +12,11 @@ "noImplicitAny": false, "sourceMap": true, "baseUrl": ".", - "types": [ - "node" ], + "types": ["node"], "paths": { - "@/*": [ - "src/*" - ] + "@/*": ["src/*"] }, - "lib": [ - "es2015", - "dom", - "dom.iterable", - "scripthost" - ] + "lib": ["es2015", "dom", "dom.iterable", "scripthost"] }, "include": [ "src/**/*.ts", @@ -34,7 +26,5 @@ "tests/**/*.tsx", "src/plugins/**/*.js" ], - "exclude": [ - "node_modules" - ] + "exclude": ["node_modules"] } diff --git a/tslint.json b/tslint.json index 9cd0800..88a350f 100644 --- a/tslint.json +++ b/tslint.json @@ -1,12 +1,8 @@ { "defaultSeverity": "warning", - "extends": [ - "tslint:recommended" - ], + "extends": ["tslint:recommended"], "linterOptions": { - "exclude": [ - "node_modules/**" - ] + "exclude": ["node_modules/**"] }, "rules": { "quotemark": [true, "single"], diff --git a/types/Crafter.ts b/types/Crafter.ts index da4dcbc..7e5d072 100644 --- a/types/Crafter.ts +++ b/types/Crafter.ts @@ -6,7 +6,6 @@ import vuetifyColors from 'vuetify/es5/util/colors'; const forbiddenColors = ['shades', 'grey', 'blueGrey']; export default class Crafter extends Searchable { - public get initials(): string | undefined { if (this.name) { let nameParts = this.name.split(', '); @@ -23,8 +22,10 @@ export default class Crafter extends Searchable { private static lastUsedColorNumber = -1; private static colors = Object.keys(vuetifyColors).filter((color) => { - return ! forbiddenColors.some((forbidden) => forbidden === color) - && ! color.startsWith('light'); + return ( + !forbiddenColors.some((forbidden) => forbidden === color) && + !color.startsWith('light') + ); }); private static allCrafters: Crafter[] = []; @@ -43,11 +44,9 @@ export default class Crafter extends Searchable { } Crafter.lastUsedColorNumber++; const colorKey = Crafter.colors[Crafter.lastUsedColorNumber] - .replace( - /(?:^|\.?)([A-Z])/g, (x, y) => '-' + y.toLowerCase(), - ) - .replace(/^-/, ''); - return this.backgroundColor = colorKey; + .replace(/(?:^|\.?)([A-Z])/g, (x, y) => '-' + y.toLowerCase()) + .replace(/^-/, ''); + return (this.backgroundColor = colorKey); } constructor(author?: IAuthor | string) { @@ -57,7 +56,9 @@ export default class Crafter extends Searchable { const authorParts = author.split('<'); if (authorParts.length === 2) { this.name = authorParts[0].trim(); - this.email = authorParts[1].slice(0, authorParts[1].length - 1).trim(); + this.email = authorParts[1] + .slice(0, authorParts[1].length - 1) + .trim(); } else { this.name = author; } @@ -65,7 +66,9 @@ export default class Crafter extends Searchable { this.name = author.name; } } - const alreadyCreatedCrafter = Crafter.allCrafters.find((crafter) => crafter.equals(this)); + const alreadyCreatedCrafter = Crafter.allCrafters.find((crafter) => + crafter.equals(this), + ); if (alreadyCreatedCrafter) { return alreadyCreatedCrafter; } else { @@ -77,7 +80,10 @@ export default class Crafter extends Searchable { if (other instanceof Crafter && other.equals(this)) { return true; } - if (other instanceof Package && other.crafters.some((crafter) => crafter.equals(this))) { + if ( + other instanceof Package && + other.crafters.some((crafter) => crafter.equals(this)) + ) { return true; } for (const item of packages) { @@ -117,9 +123,10 @@ export default class Crafter extends Searchable { if (this.email && other.email) { return this.email === other.email; } - return this.name === other.name - && this.email === other.email - && this.url === other.url; + return ( + this.name === other.name && + this.email === other.email && + this.url === other.url + ); } - } diff --git a/types/Package.ts b/types/Package.ts index 69868ac..4711902 100644 --- a/types/Package.ts +++ b/types/Package.ts @@ -16,7 +16,7 @@ import Crafter from './Crafter'; import Searchable from './Searchable'; import { Tag } from './Tag'; -export default class Package extends Searchable implements PackageMetaDataDTO { +export default class Package extends Searchable implements PackageMetaDataDTO { public readonly distTags!: IDistTags; public readonly time!: ITimes; public readonly users!: {}; @@ -91,8 +91,12 @@ export default class Package extends Searchable implements PackageMetaDataDTO { // Count depenedencies: const dependencies = packageMetaData.dependencies; const devDependencies = packageMetaData.devDependencies; - const dependenciesCount = dependencies ? Object.keys(dependencies).length : 0; - const devDependenciesCount = devDependencies ? Object.keys(devDependencies).length : 0; + const dependenciesCount = dependencies + ? Object.keys(dependencies).length + : 0; + const devDependenciesCount = devDependencies + ? Object.keys(devDependencies).length + : 0; this.dependenciesCount = dependenciesCount + devDependenciesCount; // set scope: @@ -120,10 +124,10 @@ export default class Package extends Searchable implements PackageMetaDataDTO { public getSearchItemText(): string[] { return [ - this.name || '', - this.description || '', - this.author ? this.author.toString() : '', - ] + this.name || '', + this.description || '', + this.author ? this.author.toString() : '', + ] .concat(...this.tags.map((tag) => tag.getSearchItemText())) .concat(...this.crafters.map((crafter) => crafter.getSearchItemText())); } @@ -178,5 +182,4 @@ export default class Package extends Searchable implements PackageMetaDataDTO { } return url.split('/')[2]; } - } diff --git a/types/Searchable.ts b/types/Searchable.ts index 9f650cd..6c190a4 100644 --- a/types/Searchable.ts +++ b/types/Searchable.ts @@ -6,7 +6,9 @@ export default abstract class Searchable { public abstract getSearchItemText(): string[]; public matchesPattern(pattern: string): boolean { - return this.getSearchItemText().some((text) => text.toLowerCase().includes(pattern.toLowerCase())); + return this.getSearchItemText().some((text) => + text.toLowerCase().includes(pattern.toLowerCase()), + ); } public abstract toString(): string; diff --git a/types/Tag.ts b/types/Tag.ts index 339306b..63d98ec 100644 --- a/types/Tag.ts +++ b/types/Tag.ts @@ -1,7 +1,6 @@ import Searchable from './Searchable'; import Package from './Package'; export class Tag extends Searchable { - public static allTags: Tag[] = []; public value: string; @@ -21,9 +20,9 @@ export class Tag extends Searchable { return true; } if ( - other instanceof Package - && other.tags !== undefined - && other.tags.some((tag) => tag.value === this.value) + other instanceof Package && + other.tags !== undefined && + other.tags.some((tag) => tag.value === this.value) ) { return true; } @@ -40,10 +39,6 @@ export class Tag extends Searchable { } public getSearchItemText(): string[] { - return [ - `#${this.value}`, - `keyword:${this.value}`, - `tag:${this.value}`, - ]; + return [`#${this.value}`, `keyword:${this.value}`, `tag:${this.value}`]; } } diff --git a/types/package-json.d.ts b/types/package-json.d.ts index 96588e8..1b28265 100644 --- a/types/package-json.d.ts +++ b/types/package-json.d.ts @@ -1,5 +1,4 @@ export interface IPackageJSON { - readonly name: string; readonly version?: string; @@ -10,25 +9,25 @@ export interface IPackageJSON { readonly homepage?: string; - readonly bugs?: string|IBugs; + readonly bugs?: string | IBugs; readonly license?: string; readonly author?: IAuthor | string; - readonly contributors?: string[]|IAuthor[]; + readonly contributors?: string[] | IAuthor[]; readonly files?: string[]; readonly main?: string; - readonly bin?: string|IBinMap; + readonly bin?: string | IBinMap; - readonly man?: string|string[]; + readonly man?: string | string[]; readonly directories?: IDirectories; - readonly repository?: string|IRepository; + readonly repository?: string | IRepository; readonly scripts?: IScriptsMap; @@ -55,7 +54,6 @@ export interface IPackageJSON { readonly private?: boolean; readonly publishConfig?: IPublishConfig; - } /** @@ -124,4 +122,4 @@ export interface IRepository { export interface IScriptsMap { [scriptName: string]: string; -} \ No newline at end of file +} diff --git a/types/package-meta-data.ts b/types/package-meta-data.ts index fee7a26..3fcaab9 100644 --- a/types/package-meta-data.ts +++ b/types/package-meta-data.ts @@ -1,7 +1,6 @@ import { IPackageJSON } from './package-json'; export interface PackageMetaDataDTO extends IPackageJSON { - readonly distTags: IDistTags; readonly time: ITimes; readonly users: {}; diff --git a/vue.config.js b/vue.config.js index 5ea0c63..3a604d8 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,5 +1,5 @@ module.exports = { configureWebpack: { - devtool: 'source-map' + devtool: "source-map" } -} +};