Commit Graph

71918 Commits

Author SHA1 Message Date
David Festal c19c288541 review(cli): refine the bundle command output expectations
Signed-off-by: David Festal <dfestal@redhat.com>
Assisted-by: Cursor
2026-03-16 18:42:36 +01:00
David Festal 4074a227c2 fix(backend-dynamic-feature-service): improve package resolution for bundled dynamic plugins
Updated `resolvePackagePath` to correctly resolve `package.json` for dynamic plugins that bundle their own copy of `@backstage/backend-plugin-api`. This change ensures that the resolution works for both the host application and bundled dependencies, enhancing compatibility with plugins created using the `backstage-cli package bundle` command.

Signed-off-by: David Festal <dfestal@redhat.com>
Assisted-by: Cursor
2026-03-16 18:42:07 +01:00
David Festal 551d729723 docs(backend-dynamic-feature-service): update README to mention the bundle command.
Signed-off-by: David Festal <dfestal@redhat.com>
Assisted-by: Cursor
Signed-off-by: David Festal <dfestal@redhat.com>
2026-03-16 18:37:00 +01:00
David Festal 62d08492c7 feat(cli): contribute a bundle command for dynamic loading
for both frontend and backend plugins.

Signed-off-by: David Festal <dfestal@redhat.com>
Assisted-by: Cursor
2026-03-16 18:36:46 +01:00
Patrik Oldsberg 3775ef5b51 Merge pull request #33364 from backstage/rugvip/auth-provider-icon-element
frontend-plugin-api: accept IconElement in AuthProviderInfo
2026-03-16 16:10:13 +01:00
Patrik Oldsberg 99d80927bd Merge pull request #33367 from backstage/rugvip/reduce-frontend-plugin-api-surface
frontend-plugin-api: reduce top-level API surface clutter
2026-03-16 16:06:54 +01:00
Patrik Oldsberg d7ff199a69 Merge pull request #33366 from backstage/promote-plugin-wrapper-api
frontend-plugin-api: promote PluginWrapper API to stable with useWrapperValue hook
2026-03-16 16:06:35 +01:00
Johan Persson d9d2dd6827 feat(ui): add SearchAutocomplete component
Add SearchAutocomplete and SearchAutocompleteItem components for
building accessible search-with-results patterns. Built on React
Aria's Autocomplete with virtual focus for keyboard navigation
and a non-modal popover for results.

Features:
- Controlled input via inputValue/onInputChange
- Configurable popover width and placement
- Rich content support per result item
- Item selection via onAction
- defaultOpen prop for visual testing
- Close on interact outside and input clear

Includes Storybook stories, docs-ui documentation, changeset,
and API report.

Signed-off-by: Johan Persson <johanopersson@gmail.com>
2026-03-16 15:41:58 +01:00
Andre Wanlin 5e80c4343f Merge pull request #32262 from Believe-SA/blv/techdocs-lightbox-links
fix(techdocs): Disable LightBox addon for images wrapped in links
2026-03-16 09:23:14 -05:00
Patrik Oldsberg 96e8b060f0 Merge pull request #33355 from backstage/rugvip/cli-plugin-api
cli: add CLI module plugin API and auto-discovery
2026-03-16 14:50:27 +01:00
Patrik Oldsberg 08dbd83cd3 chore: remove redundant cli.ts files from CLI modules
The bin scripts already had the full runCliModule logic for the production
path. Inline the same pattern for local dev and drop the intermediate
src/cli.ts files that just duplicated it.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 13:12:00 +01:00
Patrik Oldsberg ede7195275 chore: update yarn.lock for cli-node peer dependency changes
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 13:08:09 +01:00
Patrik Oldsberg 92b0f79d9c Make @swc/core an optional peer dependency of cli-node
The node transform config is only loaded at runtime when running
backend processes, so @swc/core should not be a hard dependency
for all cli-node consumers.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 13:03:17 +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 26eab3bf83 Rename CLI module bin entries to use backstage prefix
Rename all bin entries from `cli-module-*` to `backstage-cli-module-*`
to establish a clear namespace for Backstage CLI tooling.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 12:27:08 +01:00
Charles de Dreuille fd1854e3bc Merge pull request #33322 from backstage/jonathanroebuck/bucks-2919-fe-reusable-skeletonloading-state-for-bui-table-components
feat(ui): replace Table loading text with skeleton rows
2026-03-16 11:12:29 +00:00
Charles de Dreuille fdcec89a1a Merge pull request #33354 from backstage/charlesdedreuille/bacui-249-fix-container-bottom-margin-clash-in-bui-oss
fix(ui): fix Container bottom margin clash in Header
2026-03-16 10:28:57 +00:00
Patrik Oldsberg 72991a5211 frontend-plugin-api: remove helper types from top-level API surface
Remove `ResolvedExtensionInput` and `ExtensionDataRefToValue` from
the public API to reduce top-level API clutter. These types were
internal plumbing not needed by plugin authors.

`ResolvedExtensionInput` is now a file-local type only used by
`ResolvedExtensionInputs`. `ExtensionDataRefToValue` is no longer
re-exported from the barrel.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 11:21:13 +01:00
Patrik Oldsberg 9508514116 frontend-plugin-api: promote PluginWrapper API to stable with useWrapperValue hook
Promote PluginWrapperApi, pluginWrapperApiRef, PluginWrapperBlueprint, and
the new PluginWrapperDefinition type from @alpha to @public. Add getRootWrapper()
method to PluginWrapperApi and integrate the useWrapperValue hook pattern from
the rugvip/plugin-wrapper branch, allowing plugin wrappers to share stateful
values via a hook that runs once in the root wrapper and is distributed to all
wrapper instances via useSyncExternalStore.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 11:19:57 +01:00
Charles de Dreuille d32708ef71 Merge pull request #33353 from backstage/charlesdedreuille/bacui-272-fix-table-row-external-href
fix(ui): open external Table row hrefs in a new tab
2026-03-16 10:16:18 +00:00
Charles de Dreuille b119b54e6d Update fix-header-container-padding.md
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
2026-03-16 10:14:14 +00:00
Patrik Oldsberg e26e3de81e frontend-plugin-api: accept IconElement in AuthProviderInfo
Update the `icon` field on `AuthProviderInfo` to accept `IconElement`
in addition to `IconComponent`, and update consumers in core-components
and user-settings to handle both types at runtime.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-16 11:07:36 +01:00
Charles de Dreuille 722ce6f54c Merge pull request #33352 from backstage/charlesdedreuille/bacui-269-dialog-if-theres-no-height-on-the-dialog-then-the-content-is
fix(ui): fix Dialog content overflowing when no height prop is set
2026-03-16 09:04:01 +00:00
Patrik Oldsberg b76bbfb461 Exclude cli-report files from stale API report detection
The runApiExtraction function was detecting cli-report.md files as
stale API reports because they matched the report filename pattern.
These files are managed by runCliExtraction instead and should be
excluded from the stale report check.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-15 23:54:51 +01:00
Patrik Oldsberg ac96393a12 Fix jest peer dependency in cli-module-test-jest
Change peer dependency from jest-cli to jest to match the actual
runtime usage of require('jest') and the original @backstage/cli
peer dependency declaration.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-15 23:30:19 +01:00
Patrik Oldsberg 6395e35c6a Generate CLI reports for cli-module packages
Include cli-module role in CLI report generation alongside the
existing cli role. Packages without a bin field are silently skipped.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-15 23:12:59 +01:00
Patrik Oldsberg 55f6eb8c64 Move config files to CLI modules with lazy proxies
Move jest config files to cli-module-test-jest/config and node
transform + webpack-public-path to cli-module-build/config. Replace
originals in @backstage/cli/config with lazy proxies that forward
to the appropriate module or throw if it is not installed.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-15 22:11:43 +01:00
Patrik Oldsberg 00adaa9902 Restore findOwnPaths for serve_index.html in build module
Move serve_index.html to cli-module-build/templates and use
findOwnPaths instead of require.resolve for safer path resolution.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-15 22:01:41 +01:00
Patrik Oldsberg 2069f64201 Remove extra exports from CLI module packages
CLI modules should only export the module itself as a default export.
Remove the named `buildPlugin` export from cli-module-build and the
unused `configOption` export from cli-module-config. Also remove the
API report warning skip for CLI module packages.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-15 21:51:07 +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 4f2d7d555b Add README files to CLI module packages
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-15 15:03:35 +01:00
Patrik Oldsberg 7781ae5911 Add @backstage/cli-defaults package
Introduces a new `@backstage/cli-defaults` package that re-exports all
standard CLI modules as a single array, simplifying dependency management
for consumers. The CLI's `CliInitializer` is updated to support array
exports alongside single module exports. The create-app template,
changesets, and CLI fallback are updated to use `@backstage/cli-defaults`
instead of listing 11 individual modules.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-15 15:01:35 +01:00
Patrik Oldsberg 7db7ca5714 Convert discovered module paths to file URLs for Windows compatibility
On Windows, require.resolve() returns paths like D:\...\index.cjs.js
which when passed to import() causes ERR_UNSUPPORTED_ESM_URL_SCHEME
because the D: prefix is interpreted as a URL protocol. Use
pathToFileURL() to produce proper file:// URLs.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-15 13:35:12 +01:00
Patrik Oldsberg 47b50ef3c4 Add back @types/webpack-env to CLI dependencies
The CLI provides tsconfig presets that include webpack-env in the
types array, so @types/webpack-env must remain a dependency of the
CLI package for consuming apps to compile correctly.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-15 12:56:32 +01:00
Patrik Oldsberg 9937a8aa8e Clean up CLI module dependencies and revert incorrect require() changes
Align dependency versions in CLI modules to match the original CLI
package versions. Move dependencies that are only used by modules out
of the main CLI package, and add missing dependencies to the modules
that actually use them. Revert import-to-require conversions in
cli-module-build that were incorrectly introduced during the split.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-15 12:40:25 +01:00
Patrik Oldsberg ff593fa8fa Capture stderr in E2E plugin creation step
Keep stderr capture from the plugin creation child process to aid
debugging if the command fails in the future.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-15 02:11:14 +01:00
Patrik Oldsberg 2c952496bf Use static imports for version extraction in cli-module-new
Convert dynamic require() calls to static import statements so that
Rollup can inline the version values at build time. The cli-module role
uses preserveModules in Rollup, which cannot resolve dynamic requires.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-15 01:40:26 +01:00
Patrik Oldsberg 99af21a711 Add stderr logging to E2E plugin creation step
Capture and print stdout and stderr when the plugin creation command
fails, so that the actual error is visible in CI logs.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-15 01:26:54 +01:00
Patrik Oldsberg 935c646e89 Fix CLI module discovery and create-app test mock
Resolve CLI module entry points relative to the target project root
rather than relying on bare module name resolution. This ensures modules
are found even when the CLI package is symlinked from a separate location,
such as in the E2E test workspace setup.

Also add the missing cli-module-* entries to the create-app tasks test
mock that were omitted in a previous commit.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-15 01:12:43 +01:00
Peter Macdonald 1e2c57ebb0 Merge pull request #33334 from chanchalkhatri19/docs/okta-entity-provider
docs: add Okta entity provider documentation
2026-03-14 22:42:39 +01:00
Patrik Oldsberg f100c26c92 Fix relative paths in cli-module-translations test
The test file was moved from packages/cli/src/modules/translations/lib/
to packages/cli-module-translations/src/lib/ but the relative paths to
the repo root tsconfig.json and test fixtures were not updated.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-14 20:25:16 +01:00
Patrik Oldsberg 2fae035613 Move @types packages to devDependencies in cli-module-config and cli-module-create-github-app
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-14 17:12:41 +01:00
Patrik Oldsberg 95a5771b47 Fix remaining undeclared imports in cli-module-new and cli-module-test-jest
Add missing devDependencies to cli-module-new and add cleye, yargs,
and jest-cli peer dependency to cli-module-test-jest.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-14 16:57:58 +01:00
Patrik Oldsberg 86509de5c8 Fix CI failures: dependencies, API reports, and create-app versions
- Move runtime dependencies from devDependencies to dependencies in
  cli-module-build, cli-module-auth, cli-module-migrate, cli-module-new,
  cli-module-test-jest, and cli-module-translations
- Fix relative package.json paths in cli-module-build
- Downgrade rollup in cli-module-build to ^4.27.3 to match the CLI
- Downgrade eslint-webpack-plugin to ^4.2.0 to prevent @types/eslint v9
- Add CLI module packages to create-app version helper
- Add allow-warnings for CLI module packages in API reports
- Generate API report files for all CLI module packages

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-14 16:44:50 +01:00
Patrik Oldsberg 506da6b8be Fix rollup version in cli-module-build to prevent API report breakage
Downgrade rollup from ^4.59.0 to ^4.27.3 to match the main CLI package
and avoid the dedupe upgrading all rollup instances to 4.59.0, which
breaks API report generation.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-14 16:14:54 +01:00
Patrik Oldsberg 72457cfe98 Fix incorrect relative package.json paths in cli-module-build
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-14 16:06:33 +01:00
Patrik Oldsberg 7c8bb02ffe Fix eslint-webpack-plugin version and regenerate lockfile
Downgrade eslint-webpack-plugin in cli-module-build from ^5.0.3 to
^4.2.0 to match the main CLI package, preventing @types/eslint from
being resolved to v9 which breaks the eslint-plugin TypeScript checks.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-14 15:59:28 +01:00
Patrik Oldsberg f51e4df2d1 Fix Prettier formatting and run yarn dedupe
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-14 15:44:54 +01:00
Patrik Oldsberg 329f394d82 Start CLI module packages at version 0.0.0 with introductory changeset
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
2026-03-14 12:46:37 +01:00
Patrik Oldsberg d806b0cc9f Add automatic discovery of CLI modules from project dependencies
The CLI now scans the project root's dependencies and devDependencies
for packages with the cli-module role, loading them automatically.
Falls back to the built-in set with a deprecation warning when no
modules are found. Updated create-app templates and the monorepo root
to include all CLI modules as explicit devDependencies.

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