16 Commits

Author SHA1 Message Date
github-actions[bot] b97fcb0a93 Version Packages 2026-05-19 18:28:24 +00:00
github-actions[bot] 1cc86bee1c Version Packages (next) 2026-04-21 15:07:43 +00:00
Fredrik Adelöw 8e7f7249e7 chore: regenerate knip reports
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
Made-with: Cursor
2026-04-16 12:14:47 +02:00
github-actions[bot] 93e643d142 Version Packages 2026-04-14 14:57:31 +00:00
github-actions[bot] c1b510cabb Version Packages (next) 2026-03-24 14:54:00 +00:00
github-actions[bot] 5725b5fcfa Version Packages 2026-03-17 21:39:07 +00:00
Patrik Oldsberg b46970c880 Move known plugin package constants from cli-common to cli-internal
The known plugin package ID mappings don't need to be part of the
public API surface. Move them to @internal/cli and update consumers.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 21:35:25 +01:00
Patrik Oldsberg 2b90358730 Address PR review feedback
- Convert CliAuth getters to methods (getInstanceName, getBaseUrl) so
  options can be added in the future
- Remove StoredInstance from cli-node public API, hiding instance details
- Move secretStore to cli-internal for re-use, refactoring from fs-extra
  to node:fs
- Add shared getAuthInstanceService helper in cli-internal for
  constructing secret-store service keys
- Define StoredInstance locally in cli-module-auth instead of importing
  from cli-node
- Update all consumers and tests for the new method-based API

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-17 20:53:10 +01:00
Patrik Oldsberg 4d081452b1 Address review feedback from freben
- Use cli-defaults instead of listing individual CLI modules in
  create-app template and root package.json
- Move nodeTransform config files from cli-module-build to cli-node
  to avoid cross-module direct imports
- Rename cli-module-create-github-app to cli-module-github
- Start createCliModule init chain with Promise.resolve()
- Deduplicate exitWithError in runCliModule.ts
- Extract shared isCommandNodeHidden to @internal/cli
- Add explanatory comment for fromArray deduplication field
- Restore error for cli role packages missing bin in runCliExtraction

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 12:55:22 +01:00
Patrik Oldsberg 7879215cca Add CLI module deduplication and improve conflict reporting
Individual CLI modules now silently take precedence over array-sourced
modules (e.g. from cli-defaults) when their commands overlap. Conflict
errors between non-array modules include both package names for easier
debugging.

Commands reference their parent module instead of storing a raw package
name string. createCliModule now validates that packageJson has a name.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-15 21:16:00 +01:00
Patrik Oldsberg 18012b5802 Rename CliPlugin to CliModule and cli-plugin role to cli-module
Rename createCliPlugin to createCliModule, CliPlugin to CliModule, and
the cli-plugin package role to cli-module to better distinguish CLI
modules from other plugin types.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-14 12:40:43 +01:00
Patrik Oldsberg 1929a95b97 Rename BackstageCommand to CliCommand and CommandContext to CliCommandContext
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-14 12:40:43 +01:00
Patrik Oldsberg 7d055ef0c4 Merge cli-plugin-api into cli-node
Move createCliPlugin and related types from the standalone
@backstage/cli-plugin-api package into @backstage/cli-node and
remove the now-empty package.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-14 12:40:43 +01:00
Patrik Oldsberg a90939e138 Use opaque types for command graph nodes
Switch CommandGraph and CliInitializer to use OpaqueCommandTreeNode and
OpaqueCommandLeafNode from @internal/cli instead of raw $$type markers.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-14 12:40:42 +01:00
Patrik Oldsberg 7e6ad01a21 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
2026-03-14 12:40:42 +01:00
Patrik Oldsberg 2e5f189cfa Add @internal/cli package for opaque CLI types
Move OpaqueCliPlugin to a new @internal/cli inline package, following the
same pattern as @internal/frontend. Both cli-plugin-api and cli import it
directly, and it gets bundled into their dists at build time.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-14 12:40:42 +01:00