diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..745c5b9 --- /dev/null +++ b/.npmignore @@ -0,0 +1,3 @@ +/src/ +/tsconfig.json +/tslint.json \ No newline at end of file diff --git a/package.json b/package.json index a7e0c56..f8ea1dc 100644 --- a/package.json +++ b/package.json @@ -19,13 +19,13 @@ "devDependencies": { "@types/dateformat": "^3.0.1", "@types/fs-extra": "^9.0.4", + "@types/semver": "^7.3.4", "@types/node": "^14.14.9", "@types/tar": "^4.0.4", "tslint": "^6.1.3", "typescript": "^4.0.5" }, "dependencies": { - "@types/semver": "^7.3.4", "dateformat": "^4.0.0", "fs-extra": "^9.0.1", "semver": "^7.3.2", diff --git a/src/plugin/manager.ts b/src/plugin/manager.ts index 81c1a70..e827379 100644 --- a/src/plugin/manager.ts +++ b/src/plugin/manager.ts @@ -49,7 +49,7 @@ export class PluginManager { } public getLoaded(): IPlugin[] { - const list = [] + const list = []; for (const pl of this.plugins.values()) { list.push(pl); } diff --git a/src/plugin/repository/index.ts b/src/plugin/repository/index.ts index 0614be6..864fb3c 100644 --- a/src/plugin/repository/index.ts +++ b/src/plugin/repository/index.ts @@ -1,2 +1,2 @@ export * from './manager'; -export * from './repository'; \ No newline at end of file +export * from './repository'; diff --git a/src/plugin/repository/manager.ts b/src/plugin/repository/manager.ts index 53098e9..c1687c6 100644 --- a/src/plugin/repository/manager.ts +++ b/src/plugin/repository/manager.ts @@ -7,10 +7,10 @@ import tar from 'tar'; import { httpGET } from '../../common'; import { logger } from '../../core'; -import { IEnvironment } from "../../types"; +import { IEnvironment } from '../../types'; import { PluginManager } from '../manager'; -import { IPlugin, IPluginManifest } from "../plugin"; -import { IRepoPluginDef, IRepository } from "./repository"; +import { IPlugin, IPluginManifest } from '../plugin'; +import { IRepoPluginDef, IRepository } from './repository'; export class RepositoryManager { private repositories: Map = new Map(); @@ -52,7 +52,7 @@ export class RepositoryManager { } public getAll(): IRepository[] { - const list = [] + const list = []; for (const irep of this.repositories.values()) { list.push(irep); } @@ -69,7 +69,7 @@ export class RepositoryManager { const pluginPath = repo.url + '/' + srcFile; const tempdir = path.join(this.env.path, await fs.mkdtemp('.sbdl')); const tempfile = path.join(tempdir, srcFile); - let manifest + let manifest; try { const save = await httpGET(pluginPath, {}, false, tempfile); @@ -153,7 +153,7 @@ export class RepositoryManager { remote.url = urlParsed.href; await fs.writeJSON(local, remote); - + this.repositories.set(remote.name, remote); return remote; } @@ -185,7 +185,7 @@ export class RepositoryManager { // Checking for version differences in the plugins // Get locally installed plugins - let needsUpdates: IPluginManifest[] = []; + const needsUpdates: IPluginManifest[] = []; for (const avail of this.plugins.availablePlugins) { const repoPlugin = this.repoProvidesPlugin(oprep, avail); if (repoPlugin) { @@ -220,7 +220,7 @@ export class RepositoryManager { public async loadFromFiles(): Promise { const repos = await fs.readdir(this.env.repositoryPath); - let loaded = []; + const loaded = []; for (const rf of repos) { const file = path.join(this.env.repositoryPath, rf); try { diff --git a/src/plugin/repository/repository.ts b/src/plugin/repository/repository.ts index 28de19f..032293e 100644 --- a/src/plugin/repository/repository.ts +++ b/src/plugin/repository/repository.ts @@ -1,5 +1,3 @@ -import { IPluginManifest } from "../plugin"; - export interface IRepoPluginDef { name: string; version: string; @@ -11,4 +9,4 @@ export interface IRepository { url: string; plugins: IRepoPluginDef[]; schema: number; -} \ No newline at end of file +}