From 364d4fe187d1c732dd2b695a7a2eab092d551c80 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 19 Mar 2026 20:57:20 +0100 Subject: [PATCH] frontend-app-api: add `apis` to specialized app result types (#33445) * frontend-app-api: add `apis` to specialized app result types Added `apis: ApiHolder` to both `BootstrapSpecializedApp` and `FinalizedSpecializedApp` types, and included the APIs in the returned objects from `getBootstrapApp()`, `finalizeFromSessionState()`, and `finalizeFromBootstrapError()`. Signed-off-by: Patrik Oldsberg Made-with: Cursor * Add .patches entry for PR #33445 Signed-off-by: Patrik Oldsberg Made-with: Cursor --------- Signed-off-by: Patrik Oldsberg --- .changeset/specialized-app-apis.md | 5 +++++ .patches/pr-33445.txt | 1 + packages/frontend-app-api/report.api.md | 2 ++ .../frontend-app-api/src/wiring/prepareSpecializedApp.tsx | 6 +++++- 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .changeset/specialized-app-apis.md create mode 100644 .patches/pr-33445.txt diff --git a/.changeset/specialized-app-apis.md b/.changeset/specialized-app-apis.md new file mode 100644 index 0000000000..4ffa18457d --- /dev/null +++ b/.changeset/specialized-app-apis.md @@ -0,0 +1,5 @@ +--- +'@backstage/frontend-app-api': patch +--- + +Added `apis` to `BootstrapSpecializedApp` and `FinalizedSpecializedApp` types. diff --git a/.patches/pr-33445.txt b/.patches/pr-33445.txt new file mode 100644 index 0000000000..bc54b3aefe --- /dev/null +++ b/.patches/pr-33445.txt @@ -0,0 +1 @@ +Add `apis` to `BootstrapSpecializedApp` and `FinalizedSpecializedApp` types \ No newline at end of file diff --git a/packages/frontend-app-api/report.api.md b/packages/frontend-app-api/report.api.md index 7795794051..b6b502e2da 100644 --- a/packages/frontend-app-api/report.api.md +++ b/packages/frontend-app-api/report.api.md @@ -167,6 +167,7 @@ export type AppErrorTypes = { // @public export type BootstrapSpecializedApp = { + apis: ApiHolder; element: JSX.Element; tree: AppTree; }; @@ -217,6 +218,7 @@ export type ExtensionFactoryMiddleware = ( // @public export type FinalizedSpecializedApp = { + apis: ApiHolder; element: JSX.Element; sessionState: SpecializedAppSessionState; tree: AppTree; diff --git a/packages/frontend-app-api/src/wiring/prepareSpecializedApp.tsx b/packages/frontend-app-api/src/wiring/prepareSpecializedApp.tsx index 13b5c8e8f0..3a09804a18 100644 --- a/packages/frontend-app-api/src/wiring/prepareSpecializedApp.tsx +++ b/packages/frontend-app-api/src/wiring/prepareSpecializedApp.tsx @@ -121,6 +121,7 @@ type SignInPageProps = { * @public */ export type BootstrapSpecializedApp = { + apis: ApiHolder; element: JSX.Element; tree: AppTree; }; @@ -131,6 +132,7 @@ export type BootstrapSpecializedApp = { * @public */ export type FinalizedSpecializedApp = { + apis: ApiHolder; element: JSX.Element; sessionState: SpecializedAppSessionState; tree: AppTree; @@ -544,7 +546,7 @@ export function prepareSpecializedApp( runtime.requiresSignIn = result.requiresSignIn; signInRuntime = runtime; - bootstrapApp = result.bootstrapApp; + bootstrapApp = { ...result.bootstrapApp, apis: phase.apis }; return bootstrapApp; } @@ -704,6 +706,7 @@ function finalizeFromSessionState(options: { } return { + apis: options.phase.apis, element, sessionState: options.finalizedSessionState, tree: options.tree, @@ -771,6 +774,7 @@ function finalizeFromBootstrapError(options: { } return { + apis: options.phase.apis, element, sessionState: finalizedSessionState, tree: options.tree,