c705d44e4b
* fix(cli-module-actions): show schema flags in execute --help When an action ID is provided with --help, fetch the action schema and display action-specific flags. Falls back to generic help if auth fails. Signed-off-by: benjdlambert <ben@blam.sh> * fix(cli-module-actions): show schema flags in execute --help and fix build errors (#33518) * feat(cli-module-actions): improve CLI output formatting and UX - Pretty grouped list output with colored headers and action titles - Custom help rendering for execute --help with markdown descriptions - Support complex schema types (object, array, union) as JSON flags - Show server error details instead of generic status codes - Accept multiple plugin IDs in sources add/remove Signed-off-by: benjdlambert <ben@blam.sh> * fix(cli-module-auth): preserve instance metadata on re-login Signed-off-by: benjdlambert <ben@blam.sh> * fix: address code review feedback - Extract triplicated cli() config into showGenericHelp helper - Strip ANSI escape sequences before rendering server markdown - Configure marked-terminal extension once via lazy singleton - Parallelize listGrouped HTTP requests with Promise.all - Log actual error message in execute help catch block - Fix marked version in declarations.d.ts comment - Add tests for sourcesAdd/sourcesRemove batch operations - Add test for execute JSON parse error path - Add tests for login metadata preservation on re-auth Signed-off-by: benjdlambert <ben@blam.sh> * fix: use RegExp constructor to satisfy no-control-regex lint rule Signed-off-by: benjdlambert <ben@blam.sh> * fix: improve ANSI stripping, default info.usage, add renderMarkdown comment - Extend stripAnsiEscapes to cover OSC, DCS, APC, PM sequences - Default info.usage to avoid undefined in help output - Document why marked.use() is called per invocation Signed-off-by: benjdlambert <ben@blam.sh> * fix: use strip-ansi, fresh Marked instance, add allOf support - Replace hand-rolled ANSI stripping with strip-ansi package - Use fresh Marked instance per call instead of mutating global singleton - Add allOf to complex type detection alongside anyOf/oneOf - Add happy-path test for valid JSON complex flag parsing - Bump changeset to minor for new user-facing capabilities Signed-off-by: benjdlambert <ben@blam.sh> * refactor: collapse listGrouped into list on ActionsClient Signed-off-by: benjdlambert <ben@blam.sh> * refactor: clean up cli-module-actions structure - Extract shared pluginSourcesSchema into lib/pluginSources.ts - Merge schemaToFlags and getComplexKeys into single return value - Move CleyeFlag-to-FlagInfo conversion into format.ts - Extract parseArgs and showActionHelp from execute command body Signed-off-by: benjdlambert <ben@blam.sh> --------- Signed-off-by: benjdlambert <ben@blam.sh> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
50 lines
1.3 KiB
JSON
50 lines
1.3 KiB
JSON
{
|
|
"name": "@backstage/cli-module-actions",
|
|
"version": "0.0.2-next.1",
|
|
"description": "CLI module for executing distributed actions",
|
|
"backstage": {
|
|
"role": "cli-module"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public",
|
|
"main": "dist/index.cjs.js",
|
|
"types": "dist/index.d.ts"
|
|
},
|
|
"homepage": "https://backstage.io",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/backstage/backstage",
|
|
"directory": "packages/cli-module-actions"
|
|
},
|
|
"license": "Apache-2.0",
|
|
"main": "src/index.ts",
|
|
"types": "src/index.ts",
|
|
"files": [
|
|
"dist",
|
|
"bin"
|
|
],
|
|
"bin": "bin/backstage-cli-module-actions",
|
|
"scripts": {
|
|
"build": "backstage-cli package build",
|
|
"clean": "backstage-cli package clean",
|
|
"lint": "backstage-cli package lint",
|
|
"prepack": "backstage-cli package prepack",
|
|
"postpack": "backstage-cli package postpack",
|
|
"test": "backstage-cli package test"
|
|
},
|
|
"dependencies": {
|
|
"@backstage/cli-node": "workspace:^",
|
|
"@backstage/errors": "workspace:^",
|
|
"chalk": "^4.0.0",
|
|
"cleye": "^2.3.0",
|
|
"marked": "^15.0.12",
|
|
"marked-terminal": "^7.3.0",
|
|
"strip-ansi": "^7.1.0",
|
|
"zod": "^3.25.76 || ^4.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@backstage/backend-test-utils": "workspace:^",
|
|
"@backstage/cli": "workspace:^"
|
|
}
|
|
}
|