feat(cli): Add plugin:publish and plugin:add commands support (#10938)

RESOLVES FRMW-2864
RESOLVES FRMW-2868

**What**
Add support for the following cli commands:
- `plugin:publish`
- `plugin:add`
This commit is contained in:
Adrien de Peretti
2025-01-13 15:24:49 +01:00
committed by GitHub
parent c895ed8013
commit b7a3759824
4 changed files with 69 additions and 0 deletions

View File

@@ -276,6 +276,35 @@ function buildLocalCommands(cli, isLocalProject) {
})
),
})
.command({
command: "plugin:publish",
desc: "Publish the plugin to the local packages registry",
handler: handlerP(
getCommandHandler("plugin/publish", (args, cmd) => {
process.env.NODE_ENV = process.env.NODE_ENV || `development`
cmd(args)
return new Promise(() => {})
})
),
})
.command({
command: "plugin:add [plugin_names...]",
desc: "Add the specified plugin to the project from the local packages registry",
builder: {
plugin_names: {
type: "array",
description: "The name of the plugins to add",
demand: true,
},
},
handler: handlerP(
getCommandHandler("plugin/add", (args, cmd) => {
process.env.NODE_ENV = process.env.NODE_ENV || `development`
cmd(args)
return new Promise(() => {})
})
),
})
.command({
command: `telemetry`,
describe: `Enable or disable collection of anonymous usage data.`,