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 <poldsberg@gmail.com> Made-with: Cursor * Add .patches entry for PR #33445 Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com> Made-with: Cursor --------- Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/frontend-app-api': patch
|
||||
---
|
||||
|
||||
Added `apis` to `BootstrapSpecializedApp` and `FinalizedSpecializedApp` types.
|
||||
@@ -0,0 +1 @@
|
||||
Add `apis` to `BootstrapSpecializedApp` and `FinalizedSpecializedApp` types
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user