diff --git a/package.json b/package.json index bc403bc..f0011fc 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ }, "dependencies": { "@oclif/core": "3.20.1-dev.0", - "@oclif/plugin-test-esm-1": "^0.7.1" + "@oclif/plugin-test-esm-1": "^0.7.1", + "@oclif/plugin-plugins": "4.2.6-dev.0" }, "devDependencies": { "@oclif/prettier-config": "^0.2.1", @@ -70,7 +71,11 @@ "target": "./dist/index.js", "identifier": "ESM1_INIT_HOOK" } - ] + ], + "update": { + "target": "./dist/index.js", + "identifier": "UPDATE_HOOK" + } } }, "repository": "oclif/plugin-test-esbuild", diff --git a/src/index.ts b/src/index.ts index 8822be0..c4f034e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,5 @@ import {Command, execute} from '@oclif/core' +import * as PluginPlugins from '@oclif/plugin-plugins' import * as PluginTestEsm1 from '@oclif/plugin-test-esm-1' import ESBuild from './commands/esbuild.js' @@ -7,9 +8,11 @@ import HelloWorld from './commands/hello/world.js' export {default as INIT_HOOK} from './hooks/init/init.js' export const ESM1_INIT_HOOK = PluginTestEsm1.hooks.init +export const UPDATE_HOOK = PluginPlugins.hooks.update export const COMMANDS: Record = { ...PluginTestEsm1.commands, + ...PluginPlugins.commands, esbuild: ESBuild, hello: Hello, 'hello:alias': HelloWorld, diff --git a/yarn.lock b/yarn.lock index 46c2de2..6f4a844 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1652,6 +1652,21 @@ chalk "^5.3.0" fast-levenshtein "^3.0.0" +"@oclif/plugin-plugins@4.2.6-dev.0": + version "4.2.6-dev.0" + resolved "https://registry.yarnpkg.com/@oclif/plugin-plugins/-/plugin-plugins-4.2.6-dev.0.tgz#1c54ee81abb387317b17ac7e379eefb94664c031" + integrity sha512-uS0jMF7OkT7u9DnhOM5kD2aZ87Y2OZslQYWmbvy9RMNEcOYAvMO2lom02FtJznxsDQdC05eyZaKO3yYpuTnWRw== + dependencies: + "@oclif/core" "^3.10.2" + chalk "^5.3.0" + debug "^4.3.4" + npm "10.2.4" + npm-run-path "^4.0.1" + semver "^7.6.0" + shelljs "^0.8.5" + validate-npm-package-name "^5.0.0" + yarn "^1.22.21" + "@oclif/plugin-plugins@^4": version "4.2.5" resolved "https://registry.yarnpkg.com/@oclif/plugin-plugins/-/plugin-plugins-4.2.5.tgz#9acc18f83131c54c3cb6dcdda19c2ce183b87ba4"