@backstage/frontend-app-api 0.10.4-next.0 → 0.10.5-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # @backstage/frontend-app-api
2
2
 
3
+ ## 0.10.5-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 3e21b8d: Added `getNodesByRoutePath` method to the `AppTreeApi`.
8
+ - Updated dependencies
9
+ - @backstage/frontend-plugin-api@0.9.5-next.0
10
+ - @backstage/config@1.3.2
11
+ - @backstage/core-app-api@1.15.4
12
+ - @backstage/core-plugin-api@1.10.3
13
+ - @backstage/errors@1.2.7
14
+ - @backstage/frontend-defaults@0.1.6-next.0
15
+ - @backstage/types@1.2.1
16
+ - @backstage/version-bridge@1.0.10
17
+
18
+ ## 0.10.4
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies
23
+ - @backstage/frontend-plugin-api@0.9.4
24
+ - @backstage/core-plugin-api@1.10.3
25
+ - @backstage/types@1.2.1
26
+ - @backstage/config@1.3.2
27
+ - @backstage/core-app-api@1.15.4
28
+ - @backstage/errors@1.2.7
29
+ - @backstage/frontend-defaults@0.1.5
30
+ - @backstage/version-bridge@1.0.10
31
+
3
32
  ## 0.10.4-next.0
4
33
 
5
34
  ### Patch Changes
@@ -17,6 +17,7 @@ import { readAppExtensionsConfig } from '../tree/readAppExtensionsConfig.esm.js'
17
17
  import { instantiateAppNodeTree } from '../tree/instantiateAppNodeTree.esm.js';
18
18
  import { ApiRegistry } from '../core-app-api/src/apis/system/ApiRegistry.esm.js';
19
19
  import { AppIdentityProxy } from '../core-app-api/src/apis/implementations/IdentityApi/AppIdentityProxy.esm.js';
20
+ import { matchRoutes } from 'react-router-dom';
20
21
  import { OpaqueFrontendPlugin } from '../frontend-internal/src/wiring/InternalFrontendPlugin.esm.js';
21
22
 
22
23
  function deduplicateFeatures(allFeatures) {
@@ -34,27 +35,40 @@ function deduplicateFeatures(allFeatures) {
34
35
  }).reverse();
35
36
  }
36
37
  class AppTreeApiProxy {
37
- constructor(tree) {
38
+ constructor(tree, appBasePath) {
38
39
  this.tree = tree;
40
+ this.appBasePath = appBasePath;
39
41
  }
40
- #safeToUse = false;
41
- getTree() {
42
- if (!this.#safeToUse) {
42
+ #routeInfo;
43
+ checkIfInitialized() {
44
+ if (!this.#routeInfo) {
43
45
  throw new Error(
44
46
  `You can't access the AppTreeApi during initialization of the app tree. Please move occurrences of this out of the initialization of the factory`
45
47
  );
46
48
  }
49
+ }
50
+ getTree() {
51
+ this.checkIfInitialized();
47
52
  return { tree: this.tree };
48
53
  }
49
- initialize() {
50
- this.#safeToUse = true;
54
+ getNodesByRoutePath(sourcePath) {
55
+ this.checkIfInitialized();
56
+ let path = sourcePath;
57
+ if (path.startsWith(this.appBasePath)) {
58
+ path = path.slice(this.appBasePath.length);
59
+ }
60
+ const matchedRoutes = matchRoutes(this.#routeInfo.routeObjects, path);
61
+ const matchedAppNodes = matchedRoutes?.filter((routeObj) => !!routeObj.route.appNode).map((routeObj) => routeObj.route.appNode) || [];
62
+ return { nodes: matchedAppNodes };
63
+ }
64
+ initialize(routeInfo) {
65
+ this.#routeInfo = routeInfo;
51
66
  }
52
67
  }
53
68
  class RouteResolutionApiProxy {
54
- constructor(tree, routeBindings, basePath) {
55
- this.tree = tree;
69
+ constructor(routeBindings, appBasePath) {
56
70
  this.routeBindings = routeBindings;
57
- this.basePath = basePath;
71
+ this.appBasePath = appBasePath;
58
72
  }
59
73
  #delegate;
60
74
  #routeObjects;
@@ -66,14 +80,13 @@ class RouteResolutionApiProxy {
66
80
  }
67
81
  return this.#delegate.resolve(anyRouteRef, options);
68
82
  }
69
- initialize() {
70
- const routeInfo = extractRouteInfoFromAppNode(this.tree.root);
83
+ initialize(routeInfo) {
71
84
  this.#delegate = new RouteResolver(
72
85
  routeInfo.routePaths,
73
86
  routeInfo.routeParents,
74
87
  routeInfo.routeObjects,
75
88
  this.routeBindings,
76
- this.basePath
89
+ this.appBasePath
77
90
  );
78
91
  this.#routeObjects = routeInfo.routeObjects;
79
92
  return routeInfo;
@@ -97,15 +110,15 @@ function createSpecializedApp(options) {
97
110
  })
98
111
  );
99
112
  const factories = createApiFactories({ tree });
100
- const appTreeApi = new AppTreeApiProxy(tree);
113
+ const appBasePath = getBasePath(config);
114
+ const appTreeApi = new AppTreeApiProxy(tree, appBasePath);
101
115
  const routeResolutionApi = new RouteResolutionApiProxy(
102
- tree,
103
116
  resolveRouteBindings(
104
117
  options?.bindRoutes,
105
118
  config,
106
119
  collectRouteIds(features)
107
120
  ),
108
- getBasePath(config)
121
+ appBasePath
109
122
  );
110
123
  const appIdentityProxy = new AppIdentityProxy();
111
124
  const apiHolder = createApiHolder({
@@ -139,8 +152,9 @@ function createSpecializedApp(options) {
139
152
  }
140
153
  }
141
154
  instantiateAppNodeTree(tree.root, apiHolder);
142
- routeResolutionApi.initialize();
143
- appTreeApi.initialize();
155
+ const routeInfo = extractRouteInfoFromAppNode(tree.root);
156
+ routeResolutionApi.initialize(routeInfo);
157
+ appTreeApi.initialize(routeInfo);
144
158
  const rootEl = tree.root.instance.getData(coreExtensionData.reactElement);
145
159
  const AppComponent = () => rootEl;
146
160
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"createSpecializedApp.esm.js","sources":["../../src/wiring/createSpecializedApp.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { JSX } from 'react';\nimport { ConfigReader } from '@backstage/config';\nimport {\n ApiBlueprint,\n AppTree,\n AppTreeApi,\n appTreeApiRef,\n coreExtensionData,\n RouteRef,\n ExternalRouteRef,\n SubRouteRef,\n AnyRouteRefParams,\n RouteFunc,\n RouteResolutionApiResolveOptions,\n RouteResolutionApi,\n createApiFactory,\n routeResolutionApiRef,\n} from '@backstage/frontend-plugin-api';\nimport {\n AnyApiFactory,\n ApiHolder,\n ConfigApi,\n configApiRef,\n featureFlagsApiRef,\n identityApiRef,\n} from '@backstage/core-plugin-api';\nimport { ApiFactoryRegistry, ApiResolver } from '@backstage/core-app-api';\nimport { OpaqueFrontendPlugin } from '@internal/frontend';\n\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { resolveExtensionDefinition } from '../../../frontend-plugin-api/src/wiring/resolveExtensionDefinition';\n\nimport { extractRouteInfoFromAppNode } from '../routing/extractRouteInfoFromAppNode';\n\nimport { CreateAppRouteBinder } from '../routing';\nimport { RouteResolver } from '../routing/RouteResolver';\nimport { resolveRouteBindings } from '../routing/resolveRouteBindings';\nimport { collectRouteIds } from '../routing/collectRouteIds';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport {\n toInternalFrontendModule,\n isInternalFrontendModule,\n} from '../../../frontend-plugin-api/src/wiring/createFrontendModule';\nimport { getBasePath } from '../routing/getBasePath';\nimport { Root } from '../extensions/Root';\nimport { resolveAppTree } from '../tree/resolveAppTree';\nimport { resolveAppNodeSpecs } from '../tree/resolveAppNodeSpecs';\nimport { readAppExtensionsConfig } from '../tree/readAppExtensionsConfig';\nimport { instantiateAppNodeTree } from '../tree/instantiateAppNodeTree';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { ApiRegistry } from '../../../core-app-api/src/apis/system/ApiRegistry';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { AppIdentityProxy } from '../../../core-app-api/src/apis/implementations/IdentityApi/AppIdentityProxy';\nimport { BackstageRouteObject } from '../routing/types';\nimport { FrontendFeature } from './types';\n\nfunction deduplicateFeatures(\n allFeatures: FrontendFeature[],\n): FrontendFeature[] {\n // Start by removing duplicates by reference\n const features = Array.from(new Set(allFeatures));\n\n // Plugins are deduplicated by ID, last one wins\n const seenIds = new Set<string>();\n return features\n .reverse()\n .filter(feature => {\n if (!OpaqueFrontendPlugin.isType(feature)) {\n return true;\n }\n if (seenIds.has(feature.id)) {\n return false;\n }\n seenIds.add(feature.id);\n return true;\n })\n .reverse();\n}\n\n// Helps delay callers from reaching out to the API before the app tree has been materialized\nclass AppTreeApiProxy implements AppTreeApi {\n #safeToUse: boolean = false;\n\n constructor(private readonly tree: AppTree) {}\n\n getTree() {\n if (!this.#safeToUse) {\n throw new Error(\n `You can't access the AppTreeApi during initialization of the app tree. Please move occurrences of this out of the initialization of the factory`,\n );\n }\n return { tree: this.tree };\n }\n\n initialize() {\n this.#safeToUse = true;\n }\n}\n\n// Helps delay callers from reaching out to the API before the app tree has been materialized\nclass RouteResolutionApiProxy implements RouteResolutionApi {\n #delegate: RouteResolutionApi | undefined;\n #routeObjects: BackstageRouteObject[] | undefined;\n\n constructor(\n private readonly tree: AppTree,\n private readonly routeBindings: Map<\n ExternalRouteRef,\n RouteRef | SubRouteRef\n >,\n private readonly basePath: string,\n ) {}\n\n resolve<TParams extends AnyRouteRefParams>(\n anyRouteRef:\n | RouteRef<TParams>\n | SubRouteRef<TParams>\n | ExternalRouteRef<TParams>,\n options?: RouteResolutionApiResolveOptions,\n ): RouteFunc<TParams> | undefined {\n if (!this.#delegate) {\n throw new Error(\n `You can't access the RouteResolver during initialization of the app tree. Please move occurrences of this out of the initialization of the factory`,\n );\n }\n\n return this.#delegate.resolve(anyRouteRef, options);\n }\n\n initialize() {\n const routeInfo = extractRouteInfoFromAppNode(this.tree.root);\n\n this.#delegate = new RouteResolver(\n routeInfo.routePaths,\n routeInfo.routeParents,\n routeInfo.routeObjects,\n this.routeBindings,\n this.basePath,\n );\n this.#routeObjects = routeInfo.routeObjects;\n\n return routeInfo;\n }\n\n getRouteObjects() {\n return this.#routeObjects;\n }\n}\n/**\n * Creates an empty app without any default features. This is a low-level API is\n * intended for use in tests or specialized setups. Typically wou want to use\n * `createApp` from `@backstage/frontend-defaults` instead.\n *\n * @public\n */\nexport function createSpecializedApp(options?: {\n features?: FrontendFeature[];\n config?: ConfigApi;\n bindRoutes?(context: { bind: CreateAppRouteBinder }): void;\n}): { createRoot(): JSX.Element } {\n const config = options?.config ?? new ConfigReader({}, 'empty-config');\n const features = deduplicateFeatures(options?.features ?? []);\n\n const tree = resolveAppTree(\n 'root',\n resolveAppNodeSpecs({\n features,\n builtinExtensions: [\n resolveExtensionDefinition(Root, { namespace: 'root' }),\n ],\n parameters: readAppExtensionsConfig(config),\n forbidden: new Set(['root']),\n }),\n );\n\n const factories = createApiFactories({ tree });\n const appTreeApi = new AppTreeApiProxy(tree);\n const routeResolutionApi = new RouteResolutionApiProxy(\n tree,\n resolveRouteBindings(\n options?.bindRoutes,\n config,\n collectRouteIds(features),\n ),\n getBasePath(config),\n );\n\n const appIdentityProxy = new AppIdentityProxy();\n const apiHolder = createApiHolder({\n factories,\n staticFactories: [\n createApiFactory(appTreeApiRef, appTreeApi),\n createApiFactory(configApiRef, config),\n createApiFactory(routeResolutionApiRef, routeResolutionApi),\n createApiFactory(identityApiRef, appIdentityProxy),\n ],\n });\n\n const featureFlagApi = apiHolder.get(featureFlagsApiRef);\n if (featureFlagApi) {\n for (const feature of features) {\n if (OpaqueFrontendPlugin.isType(feature)) {\n OpaqueFrontendPlugin.toInternal(feature).featureFlags.forEach(flag =>\n featureFlagApi.registerFlag({\n name: flag.name,\n pluginId: feature.id,\n }),\n );\n }\n if (isInternalFrontendModule(feature)) {\n toInternalFrontendModule(feature).featureFlags.forEach(flag =>\n featureFlagApi.registerFlag({\n name: flag.name,\n pluginId: feature.pluginId,\n }),\n );\n }\n }\n }\n\n // Now instantiate the entire tree, which will skip anything that's already been instantiated\n instantiateAppNodeTree(tree.root, apiHolder);\n\n routeResolutionApi.initialize();\n appTreeApi.initialize();\n\n const rootEl = tree.root.instance!.getData(coreExtensionData.reactElement);\n\n const AppComponent = () => rootEl;\n\n return {\n createRoot() {\n return <AppComponent />;\n },\n };\n}\n\nfunction createApiFactories(options: { tree: AppTree }): AnyApiFactory[] {\n const emptyApiHolder = ApiRegistry.from([]);\n const factories = new Array<AnyApiFactory>();\n\n for (const apiNode of options.tree.root.edges.attachments.get('apis') ?? []) {\n instantiateAppNodeTree(apiNode, emptyApiHolder);\n const apiFactory = apiNode.instance?.getData(ApiBlueprint.dataRefs.factory);\n if (!apiFactory) {\n throw new Error(\n `No API factory found in for extension ${apiNode.spec.id}`,\n );\n }\n factories.push(apiFactory);\n }\n\n return factories;\n}\n\nfunction createApiHolder(options: {\n factories: AnyApiFactory[];\n staticFactories: AnyApiFactory[];\n}): ApiHolder {\n const factoryRegistry = new ApiFactoryRegistry();\n\n for (const factory of options.factories.slice().reverse()) {\n factoryRegistry.register('default', factory);\n }\n\n for (const factory of options.staticFactories) {\n factoryRegistry.register('static', factory);\n }\n\n ApiResolver.validateFactories(factoryRegistry, factoryRegistry.getAllApis());\n\n return new ApiResolver(factoryRegistry);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwEA,SAAS,oBACP,WACmB,EAAA;AAEnB,EAAA,MAAM,WAAW,KAAM,CAAA,IAAA,CAAK,IAAI,GAAA,CAAI,WAAW,CAAC,CAAA;AAGhD,EAAM,MAAA,OAAA,uBAAc,GAAY,EAAA;AAChC,EAAA,OAAO,QACJ,CAAA,OAAA,EACA,CAAA,MAAA,CAAO,CAAW,OAAA,KAAA;AACjB,IAAA,IAAI,CAAC,oBAAA,CAAqB,MAAO,CAAA,OAAO,CAAG,EAAA;AACzC,MAAO,OAAA,IAAA;AAAA;AAET,IAAA,IAAI,OAAQ,CAAA,GAAA,CAAI,OAAQ,CAAA,EAAE,CAAG,EAAA;AAC3B,MAAO,OAAA,KAAA;AAAA;AAET,IAAQ,OAAA,CAAA,GAAA,CAAI,QAAQ,EAAE,CAAA;AACtB,IAAO,OAA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under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { JSX } from 'react';\nimport { ConfigReader } from '@backstage/config';\nimport {\n ApiBlueprint,\n AppTree,\n AppTreeApi,\n appTreeApiRef,\n coreExtensionData,\n RouteRef,\n ExternalRouteRef,\n SubRouteRef,\n AnyRouteRefParams,\n RouteFunc,\n RouteResolutionApiResolveOptions,\n RouteResolutionApi,\n createApiFactory,\n routeResolutionApiRef,\n AppNode,\n} from '@backstage/frontend-plugin-api';\nimport {\n AnyApiFactory,\n ApiHolder,\n ConfigApi,\n configApiRef,\n featureFlagsApiRef,\n identityApiRef,\n} from '@backstage/core-plugin-api';\nimport { ApiFactoryRegistry, ApiResolver } from '@backstage/core-app-api';\nimport { OpaqueFrontendPlugin } from '@internal/frontend';\n\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { resolveExtensionDefinition } from '../../../frontend-plugin-api/src/wiring/resolveExtensionDefinition';\n\nimport { extractRouteInfoFromAppNode } from '../routing/extractRouteInfoFromAppNode';\n\nimport { CreateAppRouteBinder } from '../routing';\nimport { RouteResolver } from '../routing/RouteResolver';\nimport { resolveRouteBindings } from '../routing/resolveRouteBindings';\nimport { collectRouteIds } from '../routing/collectRouteIds';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport {\n toInternalFrontendModule,\n isInternalFrontendModule,\n} from '../../../frontend-plugin-api/src/wiring/createFrontendModule';\nimport { getBasePath } from '../routing/getBasePath';\nimport { Root } from '../extensions/Root';\nimport { resolveAppTree } from '../tree/resolveAppTree';\nimport { resolveAppNodeSpecs } from '../tree/resolveAppNodeSpecs';\nimport { readAppExtensionsConfig } from '../tree/readAppExtensionsConfig';\nimport { instantiateAppNodeTree } from '../tree/instantiateAppNodeTree';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { ApiRegistry } from '../../../core-app-api/src/apis/system/ApiRegistry';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { AppIdentityProxy } from '../../../core-app-api/src/apis/implementations/IdentityApi/AppIdentityProxy';\nimport { BackstageRouteObject } from '../routing/types';\nimport { FrontendFeature, RouteInfo } from './types';\nimport { matchRoutes } from 'react-router-dom';\n\nfunction deduplicateFeatures(\n allFeatures: FrontendFeature[],\n): FrontendFeature[] {\n // Start by removing duplicates by reference\n const features = Array.from(new Set(allFeatures));\n\n // Plugins are deduplicated by ID, last one wins\n const seenIds = new Set<string>();\n return features\n .reverse()\n .filter(feature => {\n if (!OpaqueFrontendPlugin.isType(feature)) {\n return true;\n }\n if (seenIds.has(feature.id)) {\n return false;\n }\n seenIds.add(feature.id);\n return true;\n })\n .reverse();\n}\n\n// Helps delay callers from reaching out to the API before the app tree has been materialized\nclass AppTreeApiProxy implements AppTreeApi {\n #routeInfo?: RouteInfo;\n\n constructor(\n private readonly tree: AppTree,\n private readonly appBasePath: string,\n ) {}\n\n private checkIfInitialized() {\n if (!this.#routeInfo) {\n throw new Error(\n `You can't access the AppTreeApi during initialization of the app tree. Please move occurrences of this out of the initialization of the factory`,\n );\n }\n }\n\n getTree() {\n this.checkIfInitialized();\n\n return { tree: this.tree };\n }\n\n getNodesByRoutePath(sourcePath: string): { nodes: AppNode[] } {\n this.checkIfInitialized();\n\n let path = sourcePath;\n if (path.startsWith(this.appBasePath)) {\n path = path.slice(this.appBasePath.length);\n }\n\n const matchedRoutes = matchRoutes(this.#routeInfo!.routeObjects, path);\n\n const matchedAppNodes =\n matchedRoutes\n ?.filter(routeObj => !!routeObj.route.appNode)\n .map(routeObj => routeObj.route.appNode!) || [];\n\n return { nodes: matchedAppNodes };\n }\n\n initialize(routeInfo: RouteInfo) {\n this.#routeInfo = routeInfo;\n }\n}\n\n// Helps delay callers from reaching out to the API before the app tree has been materialized\nclass RouteResolutionApiProxy implements RouteResolutionApi {\n #delegate: RouteResolutionApi | undefined;\n #routeObjects: BackstageRouteObject[] | undefined;\n\n constructor(\n private readonly routeBindings: Map<\n ExternalRouteRef,\n RouteRef | SubRouteRef\n >,\n private readonly appBasePath: string,\n ) {}\n\n resolve<TParams extends AnyRouteRefParams>(\n anyRouteRef:\n | RouteRef<TParams>\n | SubRouteRef<TParams>\n | ExternalRouteRef<TParams>,\n options?: RouteResolutionApiResolveOptions,\n ): RouteFunc<TParams> | undefined {\n if (!this.#delegate) {\n throw new Error(\n `You can't access the RouteResolver during initialization of the app tree. Please move occurrences of this out of the initialization of the factory`,\n );\n }\n\n return this.#delegate.resolve(anyRouteRef, options);\n }\n\n initialize(routeInfo: RouteInfo) {\n this.#delegate = new RouteResolver(\n routeInfo.routePaths,\n routeInfo.routeParents,\n routeInfo.routeObjects,\n this.routeBindings,\n this.appBasePath,\n );\n this.#routeObjects = routeInfo.routeObjects;\n\n return routeInfo;\n }\n\n getRouteObjects() {\n return this.#routeObjects;\n }\n}\n/**\n * Creates an empty app without any default features. This is a low-level API is\n * intended for use in tests or specialized setups. Typically wou want to use\n * `createApp` from `@backstage/frontend-defaults` instead.\n *\n * @public\n */\nexport function createSpecializedApp(options?: {\n features?: FrontendFeature[];\n config?: ConfigApi;\n bindRoutes?(context: { bind: CreateAppRouteBinder }): void;\n}): { createRoot(): JSX.Element } {\n const config = options?.config ?? new ConfigReader({}, 'empty-config');\n const features = deduplicateFeatures(options?.features ?? []);\n\n const tree = resolveAppTree(\n 'root',\n resolveAppNodeSpecs({\n features,\n builtinExtensions: [\n resolveExtensionDefinition(Root, { namespace: 'root' }),\n ],\n parameters: readAppExtensionsConfig(config),\n forbidden: new Set(['root']),\n }),\n );\n\n const factories = createApiFactories({ tree });\n const appBasePath = getBasePath(config);\n const appTreeApi = new AppTreeApiProxy(tree, appBasePath);\n const routeResolutionApi = new RouteResolutionApiProxy(\n resolveRouteBindings(\n options?.bindRoutes,\n config,\n collectRouteIds(features),\n ),\n appBasePath,\n );\n\n const appIdentityProxy = new AppIdentityProxy();\n const apiHolder = createApiHolder({\n factories,\n staticFactories: [\n createApiFactory(appTreeApiRef, appTreeApi),\n createApiFactory(configApiRef, config),\n createApiFactory(routeResolutionApiRef, routeResolutionApi),\n createApiFactory(identityApiRef, appIdentityProxy),\n ],\n });\n\n const featureFlagApi = apiHolder.get(featureFlagsApiRef);\n if (featureFlagApi) {\n for (const feature of features) {\n if (OpaqueFrontendPlugin.isType(feature)) {\n OpaqueFrontendPlugin.toInternal(feature).featureFlags.forEach(flag =>\n featureFlagApi.registerFlag({\n name: flag.name,\n pluginId: feature.id,\n }),\n );\n }\n if (isInternalFrontendModule(feature)) {\n toInternalFrontendModule(feature).featureFlags.forEach(flag =>\n featureFlagApi.registerFlag({\n name: flag.name,\n pluginId: feature.pluginId,\n }),\n );\n }\n }\n }\n\n // Now instantiate the entire tree, which will skip anything that's already been instantiated\n instantiateAppNodeTree(tree.root, apiHolder);\n\n const routeInfo = extractRouteInfoFromAppNode(tree.root);\n\n routeResolutionApi.initialize(routeInfo);\n appTreeApi.initialize(routeInfo);\n\n const rootEl = tree.root.instance!.getData(coreExtensionData.reactElement);\n\n const AppComponent = () => rootEl;\n\n return {\n createRoot() {\n return <AppComponent />;\n },\n };\n}\n\nfunction createApiFactories(options: { tree: AppTree }): AnyApiFactory[] {\n const emptyApiHolder = ApiRegistry.from([]);\n const factories = new Array<AnyApiFactory>();\n\n for (const apiNode of options.tree.root.edges.attachments.get('apis') ?? []) {\n instantiateAppNodeTree(apiNode, emptyApiHolder);\n const apiFactory = apiNode.instance?.getData(ApiBlueprint.dataRefs.factory);\n if (!apiFactory) {\n throw new Error(\n `No API factory found in for extension ${apiNode.spec.id}`,\n );\n }\n factories.push(apiFactory);\n }\n\n return factories;\n}\n\nfunction createApiHolder(options: {\n factories: AnyApiFactory[];\n staticFactories: AnyApiFactory[];\n}): ApiHolder {\n const factoryRegistry = new ApiFactoryRegistry();\n\n for (const factory of options.factories.slice().reverse()) {\n factoryRegistry.register('default', factory);\n }\n\n for (const factory of options.staticFactories) {\n factoryRegistry.register('static', factory);\n }\n\n ApiResolver.validateFactories(factoryRegistry, factoryRegistry.getAllApis());\n\n return new ApiResolver(factoryRegistry);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA0EA,SAAS,oBACP,WACmB,EAAA;AAEnB,EAAA,MAAM,WAAW,KAAM,CAAA,IAAA,CAAK,IAAI,GAAA,CAAI,WAAW,CAAC,CAAA;AAGhD,EAAM,MAAA,OAAA,uBAAc,GAAY,EAAA;AAChC,EAAA,OAAO,QACJ,CAAA,OAAA,EACA,CAAA,MAAA,CAAO,CAAW,OAAA,KAAA;AACjB,IAAA,IAAI,CAAC,oBAAA,CAAqB,MAAO,CAAA,OAAO,CAAG,EAAA;AACzC,MAAO,OAAA,IAAA;AAAA;AAET,IAAA,IAAI,OAAQ,CAAA,GAAA,CAAI,OAAQ,CAAA,EAAE,CAAG,EAAA;AAC3B,MAAO,OAAA,KAAA;AAAA;AAET,IAAQ,OAAA,CAAA,GAAA,CAAI,QAAQ,EAAE,CAAA;AACtB,IAAO,OAAA,IAAA;AAAA,GACR,EACA,OAAQ,EAAA;AACb;AAGA,MAAM,eAAsC,CAAA;AAAA,EAG1C,WAAA,CACmB,MACA,WACjB,EAAA;AAFiB,IAAA,IAAA,CAAA,IAAA,GAAA,IAAA;AACA,IAAA,IAAA,CAAA,WAAA,GAAA,WAAA;AAAA;AAChB,EALH,UAAA;AAAA,EAOQ,kBAAqB,GAAA;AAC3B,IAAI,IAAA,CAAC,KAAK,UAAY,EAAA;AACpB,MAAA,MAAM,IAAI,KAAA;AAAA,QACR,CAAA,+IAAA;AAAA,OACF;AAAA;AACF;AACF,EAEA,OAAU,GAAA;AACR,IAAA,IAAA,CAAK,kBAAmB,EAAA;AAExB,IAAO,OAAA,EAAE,IA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AAA,CAAY,iBAAkB,CAAA,eAAA,EAAiB,eAAgB,CAAA,UAAA,EAAY,CAAA;AAE3E,EAAO,OAAA,IAAI,YAAY,eAAe,CAAA;AACxC;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/frontend-app-api",
3
- "version": "0.10.4-next.0",
3
+ "version": "0.10.5-next.0",
4
4
  "backstage": {
5
5
  "role": "web-library"
6
6
  },
@@ -32,21 +32,21 @@
32
32
  "test": "backstage-cli package test"
33
33
  },
34
34
  "dependencies": {
35
- "@backstage/config": "1.3.2-next.0",
36
- "@backstage/core-app-api": "1.15.4-next.0",
37
- "@backstage/core-plugin-api": "1.10.3-next.0",
38
- "@backstage/errors": "1.2.7-next.0",
39
- "@backstage/frontend-defaults": "0.1.5-next.0",
40
- "@backstage/frontend-plugin-api": "0.9.4-next.0",
41
- "@backstage/types": "1.2.1-next.0",
35
+ "@backstage/config": "1.3.2",
36
+ "@backstage/core-app-api": "1.15.4",
37
+ "@backstage/core-plugin-api": "1.10.3",
38
+ "@backstage/errors": "1.2.7",
39
+ "@backstage/frontend-defaults": "0.1.6-next.0",
40
+ "@backstage/frontend-plugin-api": "0.9.5-next.0",
41
+ "@backstage/types": "1.2.1",
42
42
  "@backstage/version-bridge": "1.0.10",
43
43
  "lodash": "^4.17.21",
44
44
  "zod": "^3.22.4"
45
45
  },
46
46
  "devDependencies": {
47
- "@backstage/cli": "0.29.5-next.1",
48
- "@backstage/plugin-app": "0.1.5-next.0",
49
- "@backstage/test-utils": "1.7.4-next.0",
47
+ "@backstage/cli": "0.30.0-next.0",
48
+ "@backstage/plugin-app": "0.1.6-next.0",
49
+ "@backstage/test-utils": "1.7.4",
50
50
  "@testing-library/jest-dom": "^6.0.0",
51
51
  "@testing-library/react": "^16.0.0",
52
52
  "@types/react": "^18.0.0",