Refine cli-plugin-api: use packageJson, inline types, rename context fields
Replace pluginId with packageJson input for createCliPlugin, remove CommandExecuteFn type alias by inlining it, and rename CommandContext.info.description to info.name. Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com> Made-with: Cursor
This commit is contained in:
@@ -21,10 +21,8 @@ export const OpaqueCliPlugin = OpaqueType.create<{
|
||||
public: CliPlugin;
|
||||
versions: {
|
||||
readonly version: 'v1';
|
||||
readonly description: string;
|
||||
init: (registry: {
|
||||
addCommand: (command: BackstageCommand) => void;
|
||||
}) => Promise<void>;
|
||||
readonly packageName: string;
|
||||
readonly commands: Promise<ReadonlyArray<BackstageCommand>>;
|
||||
};
|
||||
}>({
|
||||
type: '@backstage/CliPlugin',
|
||||
|
||||
Reference in New Issue
Block a user