Clean up + changeset
Signed-off-by: Musaab Elfaqih <musaabe@spotify.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/frontend-app-api': patch
|
||||
---
|
||||
|
||||
Added the ability to ignore unknown extension config.
|
||||
@@ -34,6 +34,7 @@ export function createSpecializedApp(options?: {
|
||||
extensionFactoryMiddleware?:
|
||||
| ExtensionFactoryMiddleware
|
||||
| ExtensionFactoryMiddleware[];
|
||||
flags?: SpecializedAppFlags;
|
||||
}): {
|
||||
apis: ApiHolder;
|
||||
tree: AppTree;
|
||||
@@ -41,4 +42,9 @@ export function createSpecializedApp(options?: {
|
||||
|
||||
// @public @deprecated (undocumented)
|
||||
export type FrontendFeature = FrontendFeature_2;
|
||||
|
||||
// @public (undocumented)
|
||||
export type SpecializedAppFlags = {
|
||||
allowUnknownExtensionConfig?: boolean;
|
||||
};
|
||||
```
|
||||
|
||||
@@ -74,7 +74,7 @@ import { ApiRegistry } from '../../../core-app-api/src/apis/system/ApiRegistry';
|
||||
// eslint-disable-next-line @backstage/no-relative-monorepo-imports
|
||||
import { AppIdentityProxy } from '../../../core-app-api/src/apis/implementations/IdentityApi/AppIdentityProxy';
|
||||
import { BackstageRouteObject } from '../routing/types';
|
||||
import { FrontendFeature, RouteInfo } from './types';
|
||||
import { FrontendFeature, RouteInfo, SpecializedAppFlags } from './types';
|
||||
import { matchRoutes } from 'react-router-dom';
|
||||
|
||||
function deduplicateFeatures(
|
||||
@@ -208,7 +208,7 @@ export function createSpecializedApp(options?: {
|
||||
extensionFactoryMiddleware?:
|
||||
| ExtensionFactoryMiddleware
|
||||
| ExtensionFactoryMiddleware[];
|
||||
flags?: Record<string, boolean>;
|
||||
flags?: SpecializedAppFlags;
|
||||
}): { apis: ApiHolder; tree: AppTree } {
|
||||
const config = options?.config ?? new ConfigReader({}, 'empty-config');
|
||||
const features = deduplicateFeatures(options?.features ?? []);
|
||||
|
||||
@@ -28,3 +28,8 @@ export type RouteInfo = {
|
||||
routeParents: Map<RouteRef, RouteRef | undefined>;
|
||||
routeObjects: BackstageRouteObject[];
|
||||
};
|
||||
|
||||
/** @public */
|
||||
export type SpecializedAppFlags = {
|
||||
allowUnknownExtensionConfig?: boolean;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user