diff --git a/.husky/pre-push b/.husky/pre-push index 3e2bf8c..8183b11 100644 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1 +1,2 @@ +pnpm run build pnpm run test:coverage diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 9729b2a..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 Masoud Ghorbani - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/package.json b/package.json index 121fb8a..360433d 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "description": "Obsidian Vaults Manager", "type": "commonjs", "version": "0.5.0", - "license": "MIT", + "license": "GPL-3.0-only", "author": "Masoud Ghorbani", "homepage": "https://github.com/msudgh/ovm", "bugs": "https://github.com/msudgh/ovm/issues", diff --git a/src/commands/plugins/install.ts b/src/commands/plugins/install.ts index cada097..4408e26 100644 --- a/src/commands/plugins/install.ts +++ b/src/commands/plugins/install.ts @@ -1,6 +1,8 @@ import { Args, Flags, flush } from '@oclif/core' import { FactoryCommandWithVaults } from '../../providers/command' -import { action } from '../../services/install' +import installService from '../../services/install' + +const { action } = installService /** * Install command installs specified plugins in vaults. diff --git a/src/commands/plugins/prune.ts b/src/commands/plugins/prune.ts index c7a089c..797538c 100644 --- a/src/commands/plugins/prune.ts +++ b/src/commands/plugins/prune.ts @@ -1,6 +1,8 @@ import { flush } from '@oclif/core' import { FactoryCommandWithVaults } from '../../providers/command' -import { action } from '../../services/prune' +import pruneService from '../../services/prune' + +const { action } = pruneService /** * Prune command list and remove plugins that aren't referred in config file. diff --git a/src/commands/plugins/uninstall.ts b/src/commands/plugins/uninstall.ts index b38f3ba..a8d2283 100644 --- a/src/commands/plugins/uninstall.ts +++ b/src/commands/plugins/uninstall.ts @@ -1,6 +1,8 @@ import { Args, flush } from '@oclif/core' import { FactoryCommandWithVaults } from '../../providers/command' -import { action } from '../../services/uninstall' +import uninstallService from '../../services/uninstall' + +const { action } = uninstallService /** * Uninstall command removes specified plugins from vaults. diff --git a/src/commands/reports/stats.ts b/src/commands/reports/stats.ts index f82a1f7..0710031 100644 --- a/src/commands/reports/stats.ts +++ b/src/commands/reports/stats.ts @@ -1,6 +1,8 @@ import { Flags, flush } from '@oclif/core' import { FactoryCommandWithVaults } from '../../providers/command' -import { action } from '../../services/stats' +import statsService from '../../services/stats' + +const { action } = statsService export default class Stats extends FactoryCommandWithVaults { static readonly aliases = ['rs', 'reports stats'] diff --git a/src/commands/vaults/run.ts b/src/commands/vaults/run.ts index 0d69587..6342846 100644 --- a/src/commands/vaults/run.ts +++ b/src/commands/vaults/run.ts @@ -1,6 +1,8 @@ import { Args, Flags, flush } from '@oclif/core' import { FactoryCommandWithVaults } from '../../providers/command' -import { action } from '../../services/run' +import runService from '../../services/run' + +const { action } = runService export default class Run extends FactoryCommandWithVaults { static readonly aliases = ['r', 'run', 'vr', 'vaults run'] diff --git a/src/services/prune.ts b/src/services/prune.ts index fa8544c..7e015b2 100644 --- a/src/services/prune.ts +++ b/src/services/prune.ts @@ -68,8 +68,8 @@ const pruneVaultIterator = async ( const action = async ( _args: ArgInput, flags: FactoryFlagsWithVaults, - iterator: PruneCommandIterator, - callback: PruneCommandCallback, + iterator: PruneCommandIterator = () => {}, + callback: PruneCommandCallback = () => {}, ): Promise => { const { success: loadConfigSuccess,