Remove plugin key from Backstage route object.

Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
Eric Peterson
2023-06-05 14:37:30 +02:00
parent f4a693ea05
commit b00abf80a9
3 changed files with 11 additions and 14 deletions
@@ -334,10 +334,6 @@ export const routingV1Collector = createCollector(
'core.plugin',
),
),
plugin: getComponentData<BackstagePlugin>(
node.props.element,
'core.plugin',
),
};
parentChildren.push(currentObj);
} else {
@@ -364,8 +360,7 @@ export const routingV1Collector = createCollector(
element: 'gathered',
routeRefs: new Set(),
children: [MATCH_ALL_ROUTE],
plugins: pluginSet(ctx?.obj?.plugin),
plugin: ctx?.obj?.plugin,
plugins: ctx?.obj?.plugins || new Set(),
};
parentChildren.push(currentObj);
}
@@ -55,7 +55,6 @@ export interface BackstageRouteObject {
path: string;
routeRefs: Set<RouteRef>;
plugins: Set<BackstagePlugin>;
plugin?: BackstagePlugin;
}
export function isRouteRef<Params extends AnyParams>(
@@ -85,13 +85,16 @@ export class Tracker implements AnalyticsTracker {
// Never fire the special "_routable-extension-rendered" internal event.
if (action === routableExtensionRenderedEvent) {
// Instead, set it on the global store.
globalEvents.mostRecentRoutableExtensionRender = {
context: {
...context,
extension: 'App',
},
};
// But keep track of it if we're delaying a `navigate` event for a
// a gathered route node type.
if (globalEvents.mostRecentGatheredNavigation) {
globalEvents.mostRecentRoutableExtensionRender = {
context: {
...context,
extension: 'App',
},
};
}
return;
}