From 08e297df3319bbb37a22ef2cdba6fc36c0b7f87a Mon Sep 17 00:00:00 2001 From: Ben Irvin Date: Mon, 13 May 2024 13:23:12 +0200 Subject: [PATCH] fix: plugin command --- bin/strapi-plugin.js | 2 +- package.json | 4 +++- src/cli/commands/utils/helpers.ts | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/strapi-plugin.js b/bin/strapi-plugin.js index 756518b..b0b100f 100644 --- a/bin/strapi-plugin.js +++ b/bin/strapi-plugin.js @@ -1,4 +1,4 @@ #!/usr/bin/env node const { runCLI } = require('../dist/cli'); -runCLI(process.argv); \ No newline at end of file +runCLI(process.argv); diff --git a/package.json b/package.json index 53bde29..4f2b2d0 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,9 @@ }, "./package.json": "./package.json" }, - "bin": "./bin/strapi-plugin.js", + "bin": { + "strapi-plugin": "./bin/strapi-plugin.js" + }, "files": [ "bin", "dist" diff --git a/src/cli/commands/utils/helpers.ts b/src/cli/commands/utils/helpers.ts index 3edfdc5..8138884 100644 --- a/src/cli/commands/utils/helpers.ts +++ b/src/cli/commands/utils/helpers.ts @@ -6,7 +6,7 @@ const runAction = const { logger } = ctx; Promise.resolve() .then(() => { - return action(...args); + return action(...args, ctx); }) .catch((error) => { logger.error(error);