@backstage/frontend-app-api 0.1.0 → 0.2.0-next.1
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 +35 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.esm.js +249 -71
- package/dist/index.esm.js.map +1 -1
- package/package.json +12 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @backstage/frontend-app-api
|
|
2
2
|
|
|
3
|
+
## 0.2.0-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 52366db5b3: Make themes configurable through extensions, and switched default themes to use extensions instead.
|
|
8
|
+
- e5a2956dd2: Register default api implementations when creating declarative integrated apps.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
- @backstage/frontend-plugin-api@0.1.1-next.1
|
|
11
|
+
- @backstage/core-components@0.13.6-next.1
|
|
12
|
+
- @backstage/core-app-api@1.10.1-next.1
|
|
13
|
+
- @backstage/plugin-graphiql@0.2.55-next.1
|
|
14
|
+
- @backstage/core-plugin-api@1.7.0-next.0
|
|
15
|
+
- @backstage/config@1.1.0
|
|
16
|
+
- @backstage/theme@0.4.2
|
|
17
|
+
- @backstage/types@1.1.1
|
|
18
|
+
|
|
19
|
+
## 0.2.0-next.0
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- 9d03dfe5e3: The `createApp` config option has been replaced by a new `configLoader` option. There is now also a `pluginLoader` option that can be used to dynamically load plugins into the app.
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- 322bbcae24: Internal update for removal of experimental plugin configuration API.
|
|
28
|
+
- 66d51a4827: Prevents root extension override and duplicated plugin extensions.
|
|
29
|
+
- Updated dependencies
|
|
30
|
+
- @backstage/core-plugin-api@1.7.0-next.0
|
|
31
|
+
- @backstage/core-components@0.13.6-next.0
|
|
32
|
+
- @backstage/frontend-plugin-api@0.1.1-next.0
|
|
33
|
+
- @backstage/config@1.1.0
|
|
34
|
+
- @backstage/core-app-api@1.10.1-next.0
|
|
35
|
+
- @backstage/plugin-graphiql@0.2.55-next.0
|
|
36
|
+
- @backstage/types@1.1.1
|
|
37
|
+
|
|
3
38
|
## 0.1.0
|
|
4
39
|
|
|
5
40
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -22,7 +22,10 @@ declare function createExtensionTree(options: {
|
|
|
22
22
|
/** @public */
|
|
23
23
|
declare function createApp(options: {
|
|
24
24
|
plugins: BackstagePlugin[];
|
|
25
|
-
|
|
25
|
+
configLoader?: () => Promise<ConfigApi>;
|
|
26
|
+
pluginLoader?: (ctx: {
|
|
27
|
+
config: ConfigApi;
|
|
28
|
+
}) => Promise<BackstagePlugin[]>;
|
|
26
29
|
}): {
|
|
27
30
|
createRoot(): JSX.Element;
|
|
28
31
|
};
|
package/dist/index.esm.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React, { createContext, useMemo, useState, useEffect } from 'react';
|
|
2
2
|
import { ConfigReader } from '@backstage/config';
|
|
3
|
-
import { createExtension, createExtensionInput, coreExtensionData } from '@backstage/frontend-plugin-api';
|
|
3
|
+
import { createExtension, createExtensionInput, coreExtensionData, useRouteRef, createThemeExtension } from '@backstage/frontend-plugin-api';
|
|
4
4
|
import { useRoutes, BrowserRouter, useInRouterContext, MemoryRouter, Route } from 'react-router-dom';
|
|
5
|
-
import { SidebarPage, sidebarConfig, Sidebar, SidebarDivider,
|
|
5
|
+
import { SidebarPage, sidebarConfig, Sidebar, SidebarDivider, useSidebarOpenState, Link, SidebarItem, Progress, ErrorPage, ErrorPanel } from '@backstage/core-components';
|
|
6
6
|
import { makeStyles } from '@material-ui/core';
|
|
7
|
-
import { GraphiQLIcon } from '@backstage/plugin-graphiql';
|
|
8
7
|
import mapValues from 'lodash/mapValues';
|
|
9
|
-
import { useApi, appThemeApiRef, FeatureFlagState, createApiFactory, discoveryApiRef, configApiRef, alertApiRef, analyticsApiRef, errorApiRef, storageApiRef, fetchApiRef, identityApiRef, oauthRequestApiRef, googleAuthApiRef, microsoftAuthApiRef, githubAuthApiRef, oktaAuthApiRef, gitlabAuthApiRef, oneloginAuthApiRef, bitbucketAuthApiRef, bitbucketServerAuthApiRef, atlassianAuthApiRef, attachComponentData,
|
|
10
|
-
import { UrlPatternDiscovery, AlertApiForwarder, NoOpAnalyticsApi, ErrorAlerter, ErrorApiForwarder, UnhandledErrorForwarder, WebStorage, createFetchApi, FetchMiddlewares, OAuthRequestManager, GoogleAuth, MicrosoftAuth, GithubAuth, OktaAuth, GitlabAuth, OneLoginAuth, BitbucketAuth, BitbucketServerAuth, AtlassianAuth,
|
|
8
|
+
import { useApi, appThemeApiRef, FeatureFlagState, createApiFactory, discoveryApiRef, configApiRef, alertApiRef, analyticsApiRef, errorApiRef, storageApiRef, fetchApiRef, identityApiRef, oauthRequestApiRef, googleAuthApiRef, microsoftAuthApiRef, githubAuthApiRef, oktaAuthApiRef, gitlabAuthApiRef, oneloginAuthApiRef, bitbucketAuthApiRef, bitbucketServerAuthApiRef, atlassianAuthApiRef, attachComponentData, useRouteRef as useRouteRef$1, featureFlagsApiRef } from '@backstage/core-plugin-api';
|
|
9
|
+
import { UrlPatternDiscovery, AlertApiForwarder, NoOpAnalyticsApi, ErrorAlerter, ErrorApiForwarder, UnhandledErrorForwarder, WebStorage, createFetchApi, FetchMiddlewares, OAuthRequestManager, GoogleAuth, MicrosoftAuth, GithubAuth, OktaAuth, GitlabAuth, OneLoginAuth, BitbucketAuth, BitbucketServerAuth, AtlassianAuth, ApiFactoryRegistry, AppThemeSelector, ApiResolver, ApiProvider } from '@backstage/core-app-api';
|
|
11
10
|
import useObservable from 'react-use/lib/useObservable';
|
|
12
11
|
import { createVersionedContext, createVersionedValueMap } from '@backstage/version-bridge';
|
|
13
12
|
import { permissionApiRef, IdentityPermissionApi } from '@backstage/plugin-permission-react';
|
|
@@ -32,7 +31,8 @@ import MuiPeopleIcon from '@material-ui/icons/People';
|
|
|
32
31
|
import MuiPersonIcon from '@material-ui/icons/Person';
|
|
33
32
|
import MuiWarningIcon from '@material-ui/icons/Warning';
|
|
34
33
|
import MuiWorkIcon from '@material-ui/icons/Work';
|
|
35
|
-
import
|
|
34
|
+
import MuiFeaturedPlayListIcon from '@material-ui/icons/FeaturedPlayList';
|
|
35
|
+
import { UnifiedThemeProvider, themes } from '@backstage/theme';
|
|
36
36
|
import DarkIcon from '@material-ui/icons/Brightness2';
|
|
37
37
|
import LightIcon from '@material-ui/icons/WbSunny';
|
|
38
38
|
|
|
@@ -180,21 +180,25 @@ const SidebarLogo = () => {
|
|
|
180
180
|
const { isOpen } = useSidebarOpenState();
|
|
181
181
|
return /* @__PURE__ */ React.createElement("div", { className: classes.root }, /* @__PURE__ */ React.createElement(Link, { to: "/", underline: "none", className: classes.link, "aria-label": "Home" }, isOpen ? /* @__PURE__ */ React.createElement(LogoFull, null) : /* @__PURE__ */ React.createElement(LogoIcon, null)));
|
|
182
182
|
};
|
|
183
|
+
const SidebarNavItem = (props) => {
|
|
184
|
+
const { icon: Icon, title, routeRef } = props;
|
|
185
|
+
const to = useRouteRef(routeRef)();
|
|
186
|
+
return /* @__PURE__ */ React.createElement(SidebarItem, { to, icon: Icon, text: title });
|
|
187
|
+
};
|
|
183
188
|
const CoreNav = createExtension({
|
|
184
189
|
id: "core.nav",
|
|
185
190
|
at: "core.layout/nav",
|
|
186
191
|
inputs: {
|
|
187
192
|
items: createExtensionInput({
|
|
188
|
-
|
|
193
|
+
target: coreExtensionData.navTarget
|
|
189
194
|
})
|
|
190
195
|
},
|
|
191
196
|
output: {
|
|
192
197
|
element: coreExtensionData.reactElement
|
|
193
198
|
},
|
|
194
|
-
factory({ bind }) {
|
|
199
|
+
factory({ bind, inputs }) {
|
|
195
200
|
bind({
|
|
196
|
-
|
|
197
|
-
element: /* @__PURE__ */ React.createElement(Sidebar, null, /* @__PURE__ */ React.createElement(SidebarLogo, null), /* @__PURE__ */ React.createElement(SidebarDivider, null), /* @__PURE__ */ React.createElement(SidebarItem, { icon: GraphiQLIcon, to: "graphiql", text: "GraphiQL" }))
|
|
201
|
+
element: /* @__PURE__ */ React.createElement(Sidebar, null, /* @__PURE__ */ React.createElement(SidebarLogo, null), /* @__PURE__ */ React.createElement(SidebarDivider, null), inputs.items.map((item, index) => /* @__PURE__ */ React.createElement(SidebarNavItem, { ...item.target, key: index })))
|
|
198
202
|
});
|
|
199
203
|
}
|
|
200
204
|
});
|
|
@@ -382,18 +386,27 @@ function expandShorthandExtensionParameters(arrayEntry, arrayIndex) {
|
|
|
382
386
|
}
|
|
383
387
|
function mergeExtensionParameters(options) {
|
|
384
388
|
const { sources, builtinExtensions, parameters } = options;
|
|
389
|
+
const pluginExtensions = sources.flatMap((source) => {
|
|
390
|
+
return source.extensions.map((extension) => ({ ...extension, source }));
|
|
391
|
+
});
|
|
392
|
+
if (pluginExtensions.some(({ id }) => id === "root")) {
|
|
393
|
+
const rootPluginIds = pluginExtensions.filter(({ id }) => id === "root").map(({ source }) => source.id);
|
|
394
|
+
throw new Error(
|
|
395
|
+
`The following plugin(s) are overriding the 'root' extension which is forbidden: ${rootPluginIds.join(
|
|
396
|
+
","
|
|
397
|
+
)}`
|
|
398
|
+
);
|
|
399
|
+
}
|
|
385
400
|
const overrides = [
|
|
386
|
-
...
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
}))
|
|
396
|
-
),
|
|
401
|
+
...pluginExtensions.map(({ source, ...extension }) => ({
|
|
402
|
+
extension,
|
|
403
|
+
params: {
|
|
404
|
+
source,
|
|
405
|
+
at: extension.at,
|
|
406
|
+
disabled: extension.disabled,
|
|
407
|
+
config: void 0
|
|
408
|
+
}
|
|
409
|
+
})),
|
|
397
410
|
...builtinExtensions.map((extension) => ({
|
|
398
411
|
extension,
|
|
399
412
|
params: {
|
|
@@ -404,9 +417,42 @@ function mergeExtensionParameters(options) {
|
|
|
404
417
|
}
|
|
405
418
|
}))
|
|
406
419
|
];
|
|
420
|
+
const duplicatedExtensionIds = /* @__PURE__ */ new Set();
|
|
421
|
+
const duplicatedExtensionData = overrides.reduce((data, { extension, params }) => {
|
|
422
|
+
var _a, _b, _c;
|
|
423
|
+
const extensionId = extension.id;
|
|
424
|
+
const extensionData = data == null ? void 0 : data[extensionId];
|
|
425
|
+
if (extensionData)
|
|
426
|
+
duplicatedExtensionIds.add(extensionId);
|
|
427
|
+
const pluginId = (_b = (_a = params.source) == null ? void 0 : _a.id) != null ? _b : "internal";
|
|
428
|
+
const pluginCount = (_c = extensionData == null ? void 0 : extensionData[pluginId]) != null ? _c : 0;
|
|
429
|
+
return {
|
|
430
|
+
...data,
|
|
431
|
+
[extensionId]: { ...extensionData, [pluginId]: pluginCount + 1 }
|
|
432
|
+
};
|
|
433
|
+
}, {});
|
|
434
|
+
if (duplicatedExtensionIds.size > 0) {
|
|
435
|
+
throw new Error(
|
|
436
|
+
`The following extensions are duplicated: ${Array.from(
|
|
437
|
+
duplicatedExtensionIds
|
|
438
|
+
).map(
|
|
439
|
+
(extensionId) => `The extension '${extensionId}' was provided ${Object.keys(
|
|
440
|
+
duplicatedExtensionData[extensionId]
|
|
441
|
+
).map(
|
|
442
|
+
(pluginId) => `${duplicatedExtensionData[extensionId][pluginId]} time(s) by the plugin '${pluginId}'`
|
|
443
|
+
).join(" and ")}`
|
|
444
|
+
).join(", ")}`
|
|
445
|
+
);
|
|
446
|
+
}
|
|
407
447
|
for (const overrideParam of parameters) {
|
|
448
|
+
const extensionId = overrideParam.id;
|
|
449
|
+
if (extensionId === "root") {
|
|
450
|
+
throw new Error(
|
|
451
|
+
"A 'root' extension configuration was detected, but the root extension is not configurable"
|
|
452
|
+
);
|
|
453
|
+
}
|
|
408
454
|
const existingIndex = overrides.findIndex(
|
|
409
|
-
(e) => e.extension.id ===
|
|
455
|
+
(e) => e.extension.id === extensionId
|
|
410
456
|
);
|
|
411
457
|
if (existingIndex !== -1) {
|
|
412
458
|
const existing = overrides[existingIndex];
|
|
@@ -424,7 +470,7 @@ function mergeExtensionParameters(options) {
|
|
|
424
470
|
}
|
|
425
471
|
}
|
|
426
472
|
} else {
|
|
427
|
-
throw new Error(`Extension ${
|
|
473
|
+
throw new Error(`Extension ${extensionId} does not exist`);
|
|
428
474
|
}
|
|
429
475
|
}
|
|
430
476
|
return overrides.filter((override) => !override.params.disabled).map((param) => ({
|
|
@@ -520,6 +566,91 @@ function AppThemeProvider({ children }) {
|
|
|
520
566
|
return /* @__PURE__ */ React.createElement(appTheme.Provider, { children });
|
|
521
567
|
}
|
|
522
568
|
|
|
569
|
+
var __defProp$1 = Object.defineProperty;
|
|
570
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
571
|
+
var __publicField$1 = (obj, key, value) => {
|
|
572
|
+
__defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
573
|
+
return value;
|
|
574
|
+
};
|
|
575
|
+
function mkError(thing) {
|
|
576
|
+
return new Error(
|
|
577
|
+
`Tried to access IdentityApi ${thing} before app was loaded`
|
|
578
|
+
);
|
|
579
|
+
}
|
|
580
|
+
function logDeprecation(thing) {
|
|
581
|
+
console.warn(
|
|
582
|
+
`WARNING: Call to ${thing} is deprecated and will break in the future`
|
|
583
|
+
);
|
|
584
|
+
}
|
|
585
|
+
class AppIdentityProxy {
|
|
586
|
+
constructor() {
|
|
587
|
+
__publicField$1(this, "target");
|
|
588
|
+
__publicField$1(this, "waitForTarget");
|
|
589
|
+
__publicField$1(this, "resolveTarget", () => {
|
|
590
|
+
});
|
|
591
|
+
__publicField$1(this, "signOutTargetUrl", "/");
|
|
592
|
+
this.waitForTarget = new Promise((resolve) => {
|
|
593
|
+
this.resolveTarget = resolve;
|
|
594
|
+
});
|
|
595
|
+
}
|
|
596
|
+
// This is called by the app manager once the sign-in page provides us with an implementation
|
|
597
|
+
setTarget(identityApi, targetOptions) {
|
|
598
|
+
this.target = identityApi;
|
|
599
|
+
this.signOutTargetUrl = targetOptions.signOutTargetUrl;
|
|
600
|
+
this.resolveTarget(identityApi);
|
|
601
|
+
}
|
|
602
|
+
getUserId() {
|
|
603
|
+
if (!this.target) {
|
|
604
|
+
throw mkError("getUserId");
|
|
605
|
+
}
|
|
606
|
+
if (!this.target.getUserId) {
|
|
607
|
+
throw new Error("IdentityApi does not implement getUserId");
|
|
608
|
+
}
|
|
609
|
+
logDeprecation("getUserId");
|
|
610
|
+
return this.target.getUserId();
|
|
611
|
+
}
|
|
612
|
+
getProfile() {
|
|
613
|
+
if (!this.target) {
|
|
614
|
+
throw mkError("getProfile");
|
|
615
|
+
}
|
|
616
|
+
if (!this.target.getProfile) {
|
|
617
|
+
throw new Error("IdentityApi does not implement getProfile");
|
|
618
|
+
}
|
|
619
|
+
logDeprecation("getProfile");
|
|
620
|
+
return this.target.getProfile();
|
|
621
|
+
}
|
|
622
|
+
async getProfileInfo() {
|
|
623
|
+
return this.waitForTarget.then((target) => target.getProfileInfo());
|
|
624
|
+
}
|
|
625
|
+
async getBackstageIdentity() {
|
|
626
|
+
const identity = await this.waitForTarget.then(
|
|
627
|
+
(target) => target.getBackstageIdentity()
|
|
628
|
+
);
|
|
629
|
+
if (!identity.userEntityRef.match(/^.*:.*\/.*$/)) {
|
|
630
|
+
console.warn(
|
|
631
|
+
`WARNING: The App IdentityApi provided an invalid userEntityRef, '${identity.userEntityRef}'. It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`
|
|
632
|
+
);
|
|
633
|
+
}
|
|
634
|
+
return identity;
|
|
635
|
+
}
|
|
636
|
+
async getCredentials() {
|
|
637
|
+
return this.waitForTarget.then((target) => target.getCredentials());
|
|
638
|
+
}
|
|
639
|
+
async getIdToken() {
|
|
640
|
+
return this.waitForTarget.then((target) => {
|
|
641
|
+
if (!target.getIdToken) {
|
|
642
|
+
throw new Error("IdentityApi does not implement getIdToken");
|
|
643
|
+
}
|
|
644
|
+
logDeprecation("getIdToken");
|
|
645
|
+
return target.getIdToken();
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
async signOut() {
|
|
649
|
+
await this.waitForTarget.then((target) => target.signOut());
|
|
650
|
+
window.location.href = this.signOutTargetUrl;
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
|
|
523
654
|
const AppContext = createVersionedContext("app-context");
|
|
524
655
|
const AppContextProvider = ({
|
|
525
656
|
appContext,
|
|
@@ -946,26 +1077,25 @@ const icons = {
|
|
|
946
1077
|
"kind:system": MuiCategoryIcon,
|
|
947
1078
|
"kind:user": MuiPersonIcon,
|
|
948
1079
|
"kind:resource": MuiWorkIcon,
|
|
1080
|
+
"kind:template": MuiFeaturedPlayListIcon,
|
|
949
1081
|
user: MuiPersonIcon,
|
|
950
1082
|
warning: MuiWarningIcon
|
|
951
1083
|
};
|
|
952
1084
|
|
|
953
|
-
const
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
}
|
|
968
|
-
];
|
|
1085
|
+
const LightTheme = createThemeExtension({
|
|
1086
|
+
id: "light",
|
|
1087
|
+
title: "Light Theme",
|
|
1088
|
+
variant: "light",
|
|
1089
|
+
icon: /* @__PURE__ */ React.createElement(LightIcon, null),
|
|
1090
|
+
Provider: ({ children }) => /* @__PURE__ */ React.createElement(UnifiedThemeProvider, { theme: themes.light, children })
|
|
1091
|
+
});
|
|
1092
|
+
const DarkTheme = createThemeExtension({
|
|
1093
|
+
id: "dark",
|
|
1094
|
+
title: "Dark Theme",
|
|
1095
|
+
variant: "dark",
|
|
1096
|
+
icon: /* @__PURE__ */ React.createElement(DarkIcon, null),
|
|
1097
|
+
Provider: ({ children }) => /* @__PURE__ */ React.createElement(UnifiedThemeProvider, { theme: themes.dark, children })
|
|
1098
|
+
});
|
|
969
1099
|
|
|
970
1100
|
function createExtensionTree(options) {
|
|
971
1101
|
const plugins = getAvailablePlugins();
|
|
@@ -998,7 +1128,7 @@ function createExtensionTree(options) {
|
|
|
998
1128
|
},
|
|
999
1129
|
getSidebarItems() {
|
|
1000
1130
|
const RoutedSidebarItem = (props) => {
|
|
1001
|
-
const location = useRouteRef(props.routeRef);
|
|
1131
|
+
const location = useRouteRef$1(props.routeRef);
|
|
1002
1132
|
return /* @__PURE__ */ React.createElement(SidebarItem, { icon: props.icon, to: location(), text: props.title });
|
|
1003
1133
|
};
|
|
1004
1134
|
return this.getExtensionAttachments("core.nav", "items").map((node, index) => {
|
|
@@ -1021,7 +1151,14 @@ function createExtensionTree(options) {
|
|
|
1021
1151
|
}
|
|
1022
1152
|
function createInstances(options) {
|
|
1023
1153
|
var _a, _b;
|
|
1024
|
-
const builtinExtensions = [
|
|
1154
|
+
const builtinExtensions = [
|
|
1155
|
+
Core,
|
|
1156
|
+
CoreRoutes,
|
|
1157
|
+
CoreNav,
|
|
1158
|
+
CoreLayout,
|
|
1159
|
+
LightTheme,
|
|
1160
|
+
DarkTheme
|
|
1161
|
+
];
|
|
1025
1162
|
const extensionParams = mergeExtensionParameters({
|
|
1026
1163
|
sources: options.plugins,
|
|
1027
1164
|
builtinExtensions,
|
|
@@ -1045,17 +1182,17 @@ function createInstances(options) {
|
|
|
1045
1182
|
const instances = /* @__PURE__ */ new Map();
|
|
1046
1183
|
function createInstance(instanceParams) {
|
|
1047
1184
|
var _a2, _b2;
|
|
1048
|
-
const
|
|
1185
|
+
const extensionId = instanceParams.extension.id;
|
|
1186
|
+
const existingInstance = instances.get(extensionId);
|
|
1049
1187
|
if (existingInstance) {
|
|
1050
1188
|
return existingInstance;
|
|
1051
1189
|
}
|
|
1052
1190
|
const attachments = new Map(
|
|
1053
|
-
Array.from(
|
|
1054
|
-
(
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
])
|
|
1191
|
+
Array.from((_b2 = (_a2 = attachmentMap.get(extensionId)) == null ? void 0 : _a2.entries()) != null ? _b2 : []).map(
|
|
1192
|
+
([inputName, attachmentConfigs]) => {
|
|
1193
|
+
return [inputName, attachmentConfigs.map(createInstance)];
|
|
1194
|
+
}
|
|
1195
|
+
)
|
|
1059
1196
|
);
|
|
1060
1197
|
const newInstance = createExtensionInstance({
|
|
1061
1198
|
extension: instanceParams.extension,
|
|
@@ -1063,7 +1200,7 @@ function createInstances(options) {
|
|
|
1063
1200
|
config: instanceParams.config,
|
|
1064
1201
|
attachments
|
|
1065
1202
|
});
|
|
1066
|
-
instances.set(
|
|
1203
|
+
instances.set(extensionId, newInstance);
|
|
1067
1204
|
return newInstance;
|
|
1068
1205
|
}
|
|
1069
1206
|
const rootConfigs = (_b = (_a = attachmentMap.get("root")) == null ? void 0 : _a.get("default")) != null ? _b : [];
|
|
@@ -1073,25 +1210,35 @@ function createInstances(options) {
|
|
|
1073
1210
|
return { instances, rootInstances };
|
|
1074
1211
|
}
|
|
1075
1212
|
function createApp(options) {
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
config:
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1213
|
+
async function appLoader() {
|
|
1214
|
+
var _a, _b, _c, _d;
|
|
1215
|
+
const config = (_b = await ((_a = options == null ? void 0 : options.configLoader) == null ? void 0 : _a.call(options))) != null ? _b : ConfigReader.fromConfigs(
|
|
1216
|
+
overrideBaseUrlConfigs(defaultConfigLoaderSync())
|
|
1217
|
+
);
|
|
1218
|
+
const discoveredPlugins = getAvailablePlugins();
|
|
1219
|
+
const loadedPlugins = (_d = await ((_c = options.pluginLoader) == null ? void 0 : _c.call(options, { config }))) != null ? _d : [];
|
|
1220
|
+
const allPlugins = Array.from(
|
|
1221
|
+
/* @__PURE__ */ new Set([...discoveredPlugins, ...options.plugins, ...loadedPlugins])
|
|
1222
|
+
);
|
|
1223
|
+
const { rootInstances } = createInstances({
|
|
1224
|
+
plugins: allPlugins,
|
|
1225
|
+
config
|
|
1226
|
+
});
|
|
1227
|
+
const routePaths = extractRouteInfoFromInstanceTree(rootInstances);
|
|
1228
|
+
const coreInstance = rootInstances.find(({ id }) => id === "core");
|
|
1229
|
+
if (!coreInstance) {
|
|
1230
|
+
throw Error("Unable to find core extension instance");
|
|
1231
|
+
}
|
|
1232
|
+
const apiHolder = createApiHolder(coreInstance, config);
|
|
1233
|
+
const appContext = createLegacyAppContext(allPlugins);
|
|
1234
|
+
const rootElements = rootInstances.map((e) => /* @__PURE__ */ React.createElement(React.Fragment, { key: e.id }, e.getData(coreExtensionData.reactElement))).filter((x) => !!x);
|
|
1235
|
+
const App = () => /* @__PURE__ */ React.createElement(ApiProvider, { apis: apiHolder }, /* @__PURE__ */ React.createElement(AppContextProvider, { appContext }, /* @__PURE__ */ React.createElement(AppThemeProvider, null, /* @__PURE__ */ React.createElement(RoutingProvider, { routePaths }, /* @__PURE__ */ React.createElement(BrowserRouter, null, rootElements)))));
|
|
1236
|
+
return { default: App };
|
|
1088
1237
|
}
|
|
1089
|
-
const apiHolder = createApiHolder(coreInstance, appConfig);
|
|
1090
|
-
const appContext = createLegacyAppContext(allPlugins);
|
|
1091
1238
|
return {
|
|
1092
1239
|
createRoot() {
|
|
1093
|
-
const
|
|
1094
|
-
return /* @__PURE__ */ React.createElement(
|
|
1240
|
+
const LazyApp = React.lazy(appLoader);
|
|
1241
|
+
return /* @__PURE__ */ React.createElement(React.Suspense, { fallback: "Loading..." }, /* @__PURE__ */ React.createElement(LazyApp, null));
|
|
1095
1242
|
}
|
|
1096
1243
|
};
|
|
1097
1244
|
}
|
|
@@ -1112,8 +1259,7 @@ function toLegacyPlugin(plugin) {
|
|
|
1112
1259
|
},
|
|
1113
1260
|
getApis: notImplemented,
|
|
1114
1261
|
getFeatureFlags: notImplemented,
|
|
1115
|
-
provide: notImplemented
|
|
1116
|
-
__experimentalReconfigure: notImplemented
|
|
1262
|
+
provide: notImplemented
|
|
1117
1263
|
};
|
|
1118
1264
|
}
|
|
1119
1265
|
function createLegacyAppContext(plugins) {
|
|
@@ -1133,10 +1279,11 @@ function createLegacyAppContext(plugins) {
|
|
|
1133
1279
|
};
|
|
1134
1280
|
}
|
|
1135
1281
|
function createApiHolder(coreExtension, configApi) {
|
|
1136
|
-
var _a, _b;
|
|
1282
|
+
var _a, _b, _c, _d;
|
|
1137
1283
|
const factoryRegistry = new ApiFactoryRegistry();
|
|
1138
|
-
const
|
|
1139
|
-
|
|
1284
|
+
const pluginApis = (_b = (_a = coreExtension.attachments.get("apis")) == null ? void 0 : _a.map((e) => e.getData(coreExtensionData.apiFactory)).filter((x) => !!x)) != null ? _b : [];
|
|
1285
|
+
const themeExtensions = (_d = (_c = coreExtension.attachments.get("themes")) == null ? void 0 : _c.map((e) => e.getData(coreExtensionData.theme)).filter((x) => !!x)) != null ? _d : [];
|
|
1286
|
+
for (const factory of [...apis, ...pluginApis]) {
|
|
1140
1287
|
factoryRegistry.register("default", factory);
|
|
1141
1288
|
}
|
|
1142
1289
|
factoryRegistry.register("default", {
|
|
@@ -1144,11 +1291,42 @@ function createApiHolder(coreExtension, configApi) {
|
|
|
1144
1291
|
deps: {},
|
|
1145
1292
|
factory: () => new LocalStorageFeatureFlags()
|
|
1146
1293
|
});
|
|
1294
|
+
factoryRegistry.register("static", {
|
|
1295
|
+
api: identityApiRef,
|
|
1296
|
+
deps: {},
|
|
1297
|
+
factory: () => {
|
|
1298
|
+
const appIdentityProxy = new AppIdentityProxy();
|
|
1299
|
+
appIdentityProxy.setTarget(
|
|
1300
|
+
{
|
|
1301
|
+
getUserId: () => "guest",
|
|
1302
|
+
getIdToken: async () => void 0,
|
|
1303
|
+
getProfile: () => ({
|
|
1304
|
+
email: "guest@example.com",
|
|
1305
|
+
displayName: "Guest"
|
|
1306
|
+
}),
|
|
1307
|
+
getProfileInfo: async () => ({
|
|
1308
|
+
email: "guest@example.com",
|
|
1309
|
+
displayName: "Guest"
|
|
1310
|
+
}),
|
|
1311
|
+
getBackstageIdentity: async () => ({
|
|
1312
|
+
type: "user",
|
|
1313
|
+
userEntityRef: "user:default/guest",
|
|
1314
|
+
ownershipEntityRefs: ["user:default/guest"]
|
|
1315
|
+
}),
|
|
1316
|
+
getCredentials: async () => ({}),
|
|
1317
|
+
signOut: async () => {
|
|
1318
|
+
}
|
|
1319
|
+
},
|
|
1320
|
+
{ signOutTargetUrl: "/" }
|
|
1321
|
+
);
|
|
1322
|
+
return appIdentityProxy;
|
|
1323
|
+
}
|
|
1324
|
+
});
|
|
1147
1325
|
factoryRegistry.register("static", {
|
|
1148
1326
|
api: appThemeApiRef,
|
|
1149
1327
|
deps: {},
|
|
1150
1328
|
// TODO: add extension for registering themes
|
|
1151
|
-
factory: () => AppThemeSelector.createWithStorage(
|
|
1329
|
+
factory: () => AppThemeSelector.createWithStorage(themeExtensions)
|
|
1152
1330
|
});
|
|
1153
1331
|
factoryRegistry.register("static", {
|
|
1154
1332
|
api: configApiRef,
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../src/extensions/Core.tsx","../src/extensions/CoreRoutes.tsx","../src/extensions/CoreLayout.tsx","../../app/src/components/Root/LogoIcon.jsx","../../app/src/components/Root/LogoFull.tsx","../src/extensions/CoreNav.tsx","../src/wiring/createExtensionInstance.ts","../src/wiring/parameters.ts","../src/routing/RoutingContext.tsx","../src/wiring/discovery.ts","../../core-app-api/src/app/AppThemeProvider.tsx","../../core-app-api/src/app/AppContext.tsx","../../core-app-api/src/apis/implementations/FeatureFlagsApi/LocalStorageFeatureFlags.tsx","../../core-app-api/src/app/defaultConfigLoader.ts","../../core-app-api/src/app/overrideBaseUrlConfigs.ts","../../app-defaults/src/defaults/apis.ts","../../app-defaults/src/defaults/components.tsx","../../app-defaults/src/defaults/icons.tsx","../../app-defaults/src/defaults/themes.tsx","../src/wiring/createApp.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 {\n coreExtensionData,\n createExtension,\n createExtensionInput,\n} from '@backstage/frontend-plugin-api';\n\nexport const Core = createExtension({\n id: 'core',\n at: 'root',\n inputs: {\n apis: createExtensionInput({\n api: coreExtensionData.apiFactory,\n }),\n },\n output: {},\n factory() {},\n});\n","/*\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 from 'react';\nimport {\n createExtension,\n coreExtensionData,\n createExtensionInput,\n} from '@backstage/frontend-plugin-api';\nimport { useRoutes } from 'react-router-dom';\n\nexport const CoreRoutes = createExtension({\n id: 'core.routes',\n at: 'core.layout/content',\n inputs: {\n routes: createExtensionInput({\n path: coreExtensionData.routePath,\n ref: coreExtensionData.routeRef.optional(),\n element: coreExtensionData.reactElement,\n }),\n },\n output: {\n element: coreExtensionData.reactElement,\n },\n factory({ bind, inputs }) {\n const Routes = () => {\n const element = useRoutes(\n inputs.routes.map(route => ({\n path: route.path,\n element: route.element,\n })),\n );\n\n return element;\n };\n bind({\n element: <Routes />,\n });\n },\n});\n","/*\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 from 'react';\nimport {\n createExtension,\n coreExtensionData,\n createExtensionInput,\n} from '@backstage/frontend-plugin-api';\nimport { SidebarPage } from '@backstage/core-components';\n\nexport const CoreLayout = createExtension({\n id: 'core.layout',\n at: 'root',\n inputs: {\n nav: createExtensionInput(\n {\n element: coreExtensionData.reactElement,\n },\n { singleton: true },\n ),\n content: createExtensionInput(\n {\n element: coreExtensionData.reactElement,\n },\n { singleton: true },\n ),\n },\n output: {\n element: coreExtensionData.reactElement,\n },\n factory({ bind, inputs }) {\n bind({\n element: (\n <SidebarPage>\n {inputs.nav.element}\n {inputs.content.element}\n </SidebarPage>\n ),\n });\n },\n});\n","/*\n * Copyright 2020 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// @ts-check\n// NOTE: This file is intentionally .jsx, so that there is one file in this repo where we make sure .jsx files work.\n\nimport React from 'react';\nimport { makeStyles } from '@material-ui/core';\n\nconst useStyles = makeStyles({\n svg: {\n width: 'auto',\n height: 28,\n },\n path: {\n fill: '#7df3e1',\n },\n});\n\nconst LogoIcon = () => {\n const classes = useStyles();\n\n return (\n <svg\n className={classes.svg}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 337.46 428.5\"\n >\n <path\n className={classes.path}\n d=\"M303,166.05a80.69,80.69,0,0,0,13.45-10.37c.79-.77,1.55-1.53,2.3-2.3a83.12,83.12,0,0,0,7.93-9.38A63.69,63.69,0,0,0,333,133.23a48.58,48.58,0,0,0,4.35-16.4c1.49-19.39-10-38.67-35.62-54.22L198.56,0,78.3,115.23,0,190.25l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.22,49.22,0,0,0-6.8-8.87A89.17,89.17,0,0,0,259,178.29h.15a85.08,85.08,0,0,0,31-5.79A80.88,80.88,0,0,0,303,166.05ZM202.45,225.86c-19.32,18.51-50.4,21.23-75.7,5.9L51.61,186.15l67.45-64.64,76.41,46.38C223,184.58,221.49,207.61,202.45,225.86Zm8.93-82.22-70.65-42.89L205.14,39,274.51,81.1c25.94,15.72,29.31,37,10.55,55A60.69,60.69,0,0,1,211.38,143.64Zm29.86,190c-19.57,18.75-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,282.52v24.67L108.6,373.1a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.27,87.27,0,0,1,241.24,333.68Zm0-39c-19.57,18.75-46.17,29.08-74.88,29.08a123.81,123.81,0,0,1-64.1-18.19L0,243.53v24.68l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.5v-1.78A87.27,87.27,0,0,1,241.24,294.7Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.81,123.81,0,0,1-64.1-18.19L0,204.55v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.82A86.09,86.09,0,0,1,241.24,255.71Zm83.7,25.74a94.15,94.15,0,0,1-60.2,25.86h0V334a81.6,81.6,0,0,0,51.74-22.37c14-13.38,21.14-28.11,21-42.64v-2.19A94.92,94.92,0,0,1,324.94,281.45Zm-83.7,91.21c-19.57,18.76-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,321.5v24.68l108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A86.29,86.29,0,0,1,241.24,372.66ZM327,162.45c-.68.69-1.35,1.38-2.05,2.06a94.37,94.37,0,0,1-10.64,8.65,91.35,91.35,0,0,1-11.6,7,94.53,94.53,0,0,1-26.24,8.71,97.69,97.69,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a53.27,53.27,0,0,1,1.14,12V217h.05a84.41,84.41,0,0,0,25.35-5.55,81,81,0,0,0,26.39-16.82c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,172.17a48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7V150q-1.08,1.54-2.25,3.09A96.73,96.73,0,0,1,327,162.45Zm0,77.92c-.69.7-1.31,1.41-2,2.1a94.2,94.2,0,0,1-60.2,25.86h0l0,26.67h0a81.6,81.6,0,0,0,51.74-22.37A73.51,73.51,0,0,0,333,250.13a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.47.19-3.71v-2.19c-.74,1.07-1.46,2.15-2.27,3.21A95.68,95.68,0,0,1,327,240.37Zm0-39c-.69.7-1.31,1.41-2,2.1a93.18,93.18,0,0,1-10.63,8.65,91.63,91.63,0,0,1-11.63,7,95.47,95.47,0,0,1-37.94,10.18h0V256h0a81.65,81.65,0,0,0,51.74-22.37c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,211.15a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.46,2.16-2.27,3.22A95.68,95.68,0,0,1,327,201.39Z\"\n />\n </svg>\n );\n};\n\nexport default LogoIcon;\n","/*\n * Copyright 2020 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 from 'react';\nimport { makeStyles } from '@material-ui/core';\n\nconst useStyles = makeStyles({\n svg: {\n width: 'auto',\n height: 30,\n },\n path: {\n fill: '#7df3e1',\n },\n});\nconst LogoFull = () => {\n const classes = useStyles();\n\n return (\n <svg\n className={classes.svg}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 2079.95 456.05\"\n >\n <path\n className={classes.path}\n d=\"M302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Zm241-88.84q7.94,0,17.09.17t18.12,1a139.3,139.3,0,0,1,16.74,2.57,42.78,42.78,0,0,1,13.3,5.14,64.27,64.27,0,0,1,20.54,19.89Q662,168,662,186.54q0,19.54-9.49,33.78t-27.1,21.09v.68q22.78,4.82,34.87,20.58t12.08,38.4a72.62,72.62,0,0,1-4.83,26.06,65.29,65.29,0,0,1-14.33,22.46,71.57,71.57,0,0,1-23.47,15.78q-14,6-32.28,6H478.38V126.54Zm9,105.27q28,0,40.21-9.78t12.26-29.31q0-13-4.14-20.58a29.47,29.47,0,0,0-11.4-11.66A45,45,0,0,0,597,155.17a161.2,161.2,0,0,0-20.19-1.2h-65.6v77.84Zm16.57,112.13q21.74,0,34-11.66T639.59,300q0-12-4.48-19.88a34.85,34.85,0,0,0-11.91-12.52,50.14,50.14,0,0,0-17.09-6.52,105,105,0,0,0-20-1.88H511.17v84.7Zm274.79,26.74q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58A41.19,41.19,0,0,1,705,348.56q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.08-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7T736.6,249.29H707.26q.69-16.46,6.9-27.77a52.21,52.21,0,0,1,16.57-18.35,70,70,0,0,1,23.65-10.11A125.51,125.51,0,0,1,782.86,190a168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7A41.23,41.23,0,0,1,844,213.59q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-18,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.5,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14ZM1002.07,225q-11.05-9.25-29.69-9.26-15.89,0-26.58,5.83A47.29,47.29,0,0,0,928.71,237a64.66,64.66,0,0,0-9.15,22.12A119.83,119.83,0,0,0,916.8,285a98.22,98.22,0,0,0,2.93,24,64.18,64.18,0,0,0,9.15,20.74,46.2,46.2,0,0,0,16.23,14.58q10,5.49,23.82,5.48,21.75,0,34-11.31t15-31.89h30q-4.83,32.91-24.68,50.75t-54,17.83q-20.37,0-36.07-6.52A69.86,69.86,0,0,1,907,350.11a79.92,79.92,0,0,1-15.88-28.63A118.64,118.64,0,0,1,885.73,285a129.41,129.41,0,0,1,5.18-37.21,85.63,85.63,0,0,1,15.71-30.17A73.46,73.46,0,0,1,933,197.35Q948.91,190,970,190a108.54,108.54,0,0,1,28.48,3.6,69.59,69.59,0,0,1,23.48,11.15,61,61,0,0,1,16.74,19q6.55,11.49,8.29,27.26h-30.38Q1013.11,234.21,1002.07,225Zm109.77-98.41v145l81.47-77.49h39.36l-70.77,64.46,75.95,112.82h-37.29l-61.1-92.59-27.62,25.38v67.21H1082.5V126.54Zm170.54,205.22a31.07,31.07,0,0,0,10.87,10.63,49,49,0,0,0,15.19,5.66,87.06,87.06,0,0,0,17.44,1.71,109.18,109.18,0,0,0,14.5-1,53.22,53.22,0,0,0,14-3.78,26.27,26.27,0,0,0,10.53-8q4.14-5.32,4.14-13.55,0-11.31-8.63-17.14a73.69,73.69,0,0,0-21.58-9.43q-12.94-3.6-28.13-6.52a146,146,0,0,1-28.14-8.23A58.16,58.16,0,0,1,1261,267.13q-8.64-9.6-8.63-26.75,0-13.38,6-23a49.26,49.26,0,0,1,15.53-15.61,71.76,71.76,0,0,1,21.4-8.91A99.41,99.41,0,0,1,1319,190a141.31,141.31,0,0,1,28,2.58,64.85,64.85,0,0,1,22.62,8.91,46.16,46.16,0,0,1,15.7,17.15q5.87,10.8,6.91,26.91h-29.35q-.69-8.57-4.48-14.23a29.36,29.36,0,0,0-9.67-9.08,44.16,44.16,0,0,0-12.94-5,67.68,67.68,0,0,0-14.33-1.54,87.29,87.29,0,0,0-13.29,1,45.28,45.28,0,0,0-12.26,3.6,24.49,24.49,0,0,0-9,6.86q-3.46,4.29-3.46,11.14a16.32,16.32,0,0,0,5.36,12.52,42.75,42.75,0,0,0,13.63,8.23,120,120,0,0,0,18.64,5.48q10.37,2.24,20.72,4.63,11,2.4,21.57,5.83A70.74,70.74,0,0,1,1382,284.1a44.55,44.55,0,0,1,13.12,14.23q5,8.58,5,21.26,0,16.13-6.73,26.75a52.5,52.5,0,0,1-17.61,17.14,73.89,73.89,0,0,1-24.51,9.09,146.3,146.3,0,0,1-27.1,2.57,126.24,126.24,0,0,1-28.31-3.09A69.56,69.56,0,0,1,1272,361.94a51.74,51.74,0,0,1-16.57-18.52q-6.21-11.49-6.9-27.95h29.34A32.65,32.65,0,0,0,1282.38,331.76Zm226.46-137.67v25.72h-35.56V329.88a31.37,31.37,0,0,0,.87,8.23,8.42,8.42,0,0,0,3.28,4.8,14.61,14.61,0,0,0,6.73,2.23,99.19,99.19,0,0,0,11.22.51h13.46v25.72H1486.4a105.8,105.8,0,0,1-19.5-1.55,28.65,28.65,0,0,1-13.12-5.65,24.09,24.09,0,0,1-7.42-11.66q-2.43-7.54-2.42-19.89V219.81h-30.38V194.09h30.38V140.94h29.34v53.15ZM1699.4,370.68q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58,41.19,41.19,0,0,1-12.6-15.26q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.07-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7t-13.46,26.57h-29.34q.67-16.46,6.9-27.77A52.21,52.21,0,0,1,1562,203.17a70,70,0,0,1,23.65-10.11,125.51,125.51,0,0,1,28.48-3.09,168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7,41.23,41.23,0,0,1,15.53,14.89q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-17.95,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.51,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14Zm208.85,141.62q-20,21.6-62.83,21.6a122.11,122.11,0,0,1-25.37-2.74,78,78,0,0,1-23.48-8.92,54.41,54.41,0,0,1-17.43-16.11q-6.91-10-7.6-24.35h29.35a21.47,21.47,0,0,0,5,13.38,36.67,36.67,0,0,0,11.4,8.91,55.52,55.52,0,0,0,14.67,5,79.51,79.51,0,0,0,15.19,1.55q14.49,0,24.51-5A46,46,0,0,0,1840.59,401a56.53,56.53,0,0,0,9.49-21.09,117.46,117.46,0,0,0,2.94-27.09V341.19h-.7q-7.59,16.46-23,24.18a71.8,71.8,0,0,1-32.63,7.71q-20,0-34.86-7.2A72.88,72.88,0,0,1,1737,346.51a82.13,82.13,0,0,1-15-28.46,116.62,116.62,0,0,1-5-34.47,133.92,133.92,0,0,1,4.14-32.4A88.17,88.17,0,0,1,1735,221a75.49,75.49,0,0,1,25.55-22.29q15.87-8.75,39-8.75a66.21,66.21,0,0,1,31.07,7.38,52.13,52.13,0,0,1,22.09,22.11h.35V194.09h27.61V356.28Q1880.63,399.83,1860.61,421.43Zm-37.46-79.72a47.94,47.94,0,0,0,16.4-15.78,71.89,71.89,0,0,0,9.15-22.11,106.77,106.77,0,0,0,2.93-24.69,96.71,96.71,0,0,0-2.76-23,64,64,0,0,0-8.8-20.4,45.76,45.76,0,0,0-15.71-14.57q-9.66-5.49-23.47-5.49-14.16,0-24.17,5.32a46.77,46.77,0,0,0-16.4,14.23,60.14,60.14,0,0,0-9.32,20.57,99.69,99.69,0,0,0-2.93,24.35,120.63,120.63,0,0,0,2.42,24,67.5,67.5,0,0,0,8.28,21.77,46.37,46.37,0,0,0,15.54,15.78q9.66,6,24.16,6T1823.15,341.71Zm228,18.34q-20,15.09-50.41,15.09-21.4,0-37.11-6.86a73.16,73.16,0,0,1-26.41-19.2,81.52,81.52,0,0,1-16-29.49,141.12,141.12,0,0,1-6-37.38,106.1,106.1,0,0,1,6.21-37A88.56,88.56,0,0,1,1938.8,216a79.09,79.09,0,0,1,26.58-19.2A81.66,81.66,0,0,1,1999,190q23.82,0,39.53,9.78a78,78,0,0,1,25.2,24.86,98.18,98.18,0,0,1,13.12,32.91,140.6,140.6,0,0,1,2.93,34h-133.6a70,70,0,0,0,2.76,22.12,49.9,49.9,0,0,0,10,18.51A49.1,49.1,0,0,0,1976.6,345q10.7,4.82,25.2,4.8,18.65,0,30.55-8.57t15.71-26.06h29Q2071.18,345,2051.17,360.05Zm-7.08-113.84a50,50,0,0,0-10.7-16,53.1,53.1,0,0,0-56.62-10.63,47.48,47.48,0,0,0-15.71,10.81,51.69,51.69,0,0,0-10.35,15.94,60.18,60.18,0,0,0-4.49,19.37h102.53A59.47,59.47,0,0,0,2044.09,246.21ZM302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Z\"\n />\n </svg>\n );\n};\n\nexport default LogoFull;\n","/*\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 from 'react';\nimport {\n createExtension,\n coreExtensionData,\n createExtensionInput,\n} from '@backstage/frontend-plugin-api';\nimport { makeStyles } from '@material-ui/core';\nimport {\n Sidebar,\n useSidebarOpenState,\n Link,\n sidebarConfig,\n SidebarDivider,\n SidebarItem,\n} from '@backstage/core-components';\nimport { GraphiQLIcon } from '@backstage/plugin-graphiql';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport LogoIcon from '../../../app/src/components/Root/LogoIcon';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport LogoFull from '../../../app/src/components/Root/LogoFull';\n\nconst useSidebarLogoStyles = makeStyles({\n root: {\n width: sidebarConfig.drawerWidthClosed,\n height: 3 * sidebarConfig.logoHeight,\n display: 'flex',\n flexFlow: 'row nowrap',\n alignItems: 'center',\n marginBottom: -14,\n },\n link: {\n width: sidebarConfig.drawerWidthClosed,\n marginLeft: 24,\n },\n});\n\nconst SidebarLogo = () => {\n const classes = useSidebarLogoStyles();\n const { isOpen } = useSidebarOpenState();\n\n return (\n <div className={classes.root}>\n <Link to=\"/\" underline=\"none\" className={classes.link} aria-label=\"Home\">\n {isOpen ? <LogoFull /> : <LogoIcon />}\n </Link>\n </div>\n );\n};\n\nexport const CoreNav = createExtension({\n id: 'core.nav',\n at: 'core.layout/nav',\n inputs: {\n items: createExtensionInput({\n path: coreExtensionData.navTarget,\n }),\n },\n output: {\n element: coreExtensionData.reactElement,\n },\n factory({ bind }) {\n bind({\n // TODO: set base path using the logic from AppRouter\n element: (\n <Sidebar>\n <SidebarLogo />\n <SidebarDivider />\n <SidebarItem icon={GraphiQLIcon} to=\"graphiql\" text=\"GraphiQL\" />\n </Sidebar>\n ),\n });\n },\n});\n","/*\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 {\n AnyExtensionDataMap,\n AnyExtensionInputMap,\n BackstagePlugin,\n Extension,\n ExtensionDataRef,\n} from '@backstage/frontend-plugin-api';\nimport mapValues from 'lodash/mapValues';\n\n/** @internal */\nexport interface ExtensionInstance {\n readonly $$type: '@backstage/ExtensionInstance';\n\n readonly id: string;\n /**\n * Get concrete value for the given extension data reference. Returns undefined if no value is available.\n */\n getData<T>(ref: ExtensionDataRef<T>): T | undefined;\n /**\n * Maps input names to the actual instances given to them.\n */\n readonly attachments: Map<string, ExtensionInstance[]>;\n}\n\nfunction resolveInputData(\n dataMap: AnyExtensionDataMap,\n attachment: ExtensionInstance,\n inputName: string,\n) {\n return mapValues(dataMap, ref => {\n const value = attachment.getData(ref);\n if (value === undefined && !ref.config.optional) {\n throw new Error(\n `input '${inputName}' did not receive required extension data '${ref.id}' from extension '${attachment.id}'`,\n );\n }\n return value;\n });\n}\n\nfunction resolveInputs(\n inputMap: AnyExtensionInputMap,\n attachments: Map<string, ExtensionInstance[]>,\n) {\n return mapValues(inputMap, (input, inputName) => {\n const attachedInstances = attachments.get(inputName) ?? [];\n if (input.config.singleton) {\n if (attachedInstances.length > 1) {\n throw Error(\n `expected ${\n input.config.optional ? 'at most' : 'exactly'\n } one '${inputName}' input but received multiple: '${attachedInstances\n .map(e => e.id)\n .join(\"', '\")}'`,\n );\n } else if (attachedInstances.length === 0) {\n if (input.config.optional) {\n return undefined;\n }\n throw Error(`input '${inputName}' is required but was not received`);\n }\n return resolveInputData(\n input.extensionData,\n attachedInstances[0],\n inputName,\n );\n }\n\n return attachedInstances.map(attachment =>\n resolveInputData(input.extensionData, attachment, inputName),\n );\n });\n}\n\n/** @internal */\nexport function createExtensionInstance(options: {\n extension: Extension<unknown>;\n config: unknown;\n source?: BackstagePlugin;\n attachments: Map<string, ExtensionInstance[]>;\n}): ExtensionInstance {\n const { extension, config, source, attachments } = options;\n const extensionData = new Map<string, unknown>();\n\n let parsedConfig: unknown;\n try {\n parsedConfig = extension.configSchema?.parse(config ?? {});\n } catch (e) {\n throw new Error(\n `Invalid configuration for extension '${extension.id}'; caused by ${e}`,\n );\n }\n\n try {\n extension.factory({\n source,\n config: parsedConfig,\n bind: namedOutputs => {\n for (const [name, output] of Object.entries(namedOutputs)) {\n const ref = extension.output[name];\n if (!ref) {\n throw new Error(`unknown output provided via '${name}'`);\n }\n if (extensionData.has(ref.id)) {\n throw new Error(\n `duplicate extension data '${ref.id}' received via output '${name}'`,\n );\n }\n extensionData.set(ref.id, output);\n }\n },\n inputs: resolveInputs(extension.inputs, attachments),\n });\n } catch (e) {\n throw new Error(\n `Failed to instantiate extension '${extension.id}'${\n e.name === 'Error' ? `, ${e.message}` : `; caused by ${e}`\n }`,\n );\n }\n\n return {\n $$type: '@backstage/ExtensionInstance',\n id: options.extension.id,\n getData<T>(ref: ExtensionDataRef<T>): T | undefined {\n return extensionData.get(ref.id) as T | undefined;\n },\n\n attachments,\n };\n}\n","/*\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 { Config } from '@backstage/config';\nimport { BackstagePlugin, Extension } from '@backstage/frontend-plugin-api';\nimport { JsonValue } from '@backstage/types';\n\nexport interface ExtensionParameters {\n id: string;\n at?: string;\n disabled?: boolean;\n config?: unknown;\n}\n\nconst knownExtensionParameters = ['at', 'disabled', 'config'];\n\n// Since we'll never merge arrays in config the config reader context\n// isn't too much of a help. Fall back to manual config reading logic\n// as the Config interface makes it quite hard for us otherwise.\n/** @internal */\nexport function readAppExtensionParameters(\n rootConfig: Config,\n): ExtensionParameters[] {\n const arr = rootConfig.getOptional('app.extensions');\n if (!Array.isArray(arr)) {\n if (arr === undefined) {\n return [];\n }\n // This will throw, and show which part of config had the wrong type\n rootConfig.getConfigArray('app.extensions');\n return [];\n }\n\n return arr.map((arrayEntry, arrayIndex) =>\n expandShorthandExtensionParameters(arrayEntry, arrayIndex),\n );\n}\n\n/** @internal */\nexport function expandShorthandExtensionParameters(\n arrayEntry: JsonValue,\n arrayIndex: number,\n): ExtensionParameters {\n function errorMsg(msg: string, key?: string, prop?: string) {\n return `Invalid extension configuration at app.extensions[${arrayIndex}]${\n key ? `[${key}]` : ''\n }${prop ? `.${prop}` : ''}, ${msg}`;\n }\n\n // NOTE(freben): This check is intentionally not complete and doesn't check\n // whether letters and digits are used, etc. It's not up to the config reading\n // logic to decide what constitutes a valid extension ID; that should be\n // decided by the logic that loads and instantiates the extensions. This check\n // is just here to catch real mistakes or truly conceptually wrong input.\n function assertValidId(id: string) {\n if (!id || id !== id.trim()) {\n throw new Error(\n errorMsg('extension ID must not be empty or contain whitespace'),\n );\n }\n\n if (id.includes('/')) {\n let message = `extension ID must not contain slashes; got '${id}'`;\n const good = id.split('/')[0];\n if (good) {\n message += `, did you mean '${good}'?`;\n }\n throw new Error(errorMsg(message));\n }\n }\n\n // Example YAML:\n // - entity.card.about\n if (typeof arrayEntry === 'string') {\n assertValidId(arrayEntry);\n return {\n id: arrayEntry,\n disabled: false,\n };\n }\n\n // All remaining cases are single-key objects\n if (\n typeof arrayEntry !== 'object' ||\n arrayEntry === null ||\n Array.isArray(arrayEntry)\n ) {\n throw new Error(errorMsg('must be a string or an object'));\n }\n const keys = Object.keys(arrayEntry);\n if (keys.length !== 1) {\n const joinedKeys = keys.length ? `'${keys.join(\"', '\")}'` : 'none';\n throw new Error(errorMsg(`must have exactly one key, got ${joinedKeys}`));\n }\n\n const id = String(keys[0]);\n const value = arrayEntry[id];\n assertValidId(id);\n\n // This example covers a potentially common mistake in the syntax\n // Example YAML:\n // - entity.card.about:\n if (value === null) {\n return {\n id,\n disabled: false,\n };\n }\n\n // Example YAML:\n // - catalog.page.cicd: false\n if (typeof value === 'boolean') {\n return {\n id,\n disabled: !value,\n };\n }\n\n // The remaining case is the generic object. Example YAML:\n // - tech-radar.page:\n // at: core.router/routes\n // disabled: false\n // config:\n // path: /tech-radar\n // width: 1500\n // height: 800\n if (typeof value !== 'object' || Array.isArray(value)) {\n // We don't mention null here - we don't want people to explicitly enter\n // - entity.card.about: null\n throw new Error(errorMsg('value must be a boolean or object', id));\n }\n\n const at = value.at;\n const disabled = value.disabled;\n const config = value.config;\n\n if (at !== undefined && typeof at !== 'string') {\n throw new Error(errorMsg('must be a string', id, 'at'));\n } else if (disabled !== undefined && typeof disabled !== 'boolean') {\n throw new Error(errorMsg('must be a boolean', id, 'disabled'));\n } else if (\n config !== undefined &&\n (typeof config !== 'object' || config === null || Array.isArray(config))\n ) {\n throw new Error(errorMsg('must be an object', id, 'config'));\n }\n\n const unknownKeys = Object.keys(value).filter(\n k => !knownExtensionParameters.includes(k),\n );\n if (unknownKeys.length > 0) {\n throw new Error(\n errorMsg(\n `unknown parameter; expected one of '${knownExtensionParameters.join(\n \"', '\",\n )}'`,\n id,\n unknownKeys.join(', '),\n ),\n );\n }\n\n return {\n id,\n at,\n disabled,\n config,\n };\n}\n\nexport interface ExtensionInstanceParameters {\n extension: Extension<unknown>;\n source?: BackstagePlugin;\n at: string;\n config?: unknown;\n}\n\n/** @internal */\nexport function mergeExtensionParameters(options: {\n sources: BackstagePlugin[];\n builtinExtensions: Extension<unknown>[];\n parameters: Array<ExtensionParameters>;\n}): ExtensionInstanceParameters[] {\n const { sources, builtinExtensions, parameters } = options;\n\n const overrides = [\n ...sources.flatMap(plugin =>\n plugin.extensions.map(extension => ({\n extension,\n params: {\n source: plugin,\n at: extension.at,\n disabled: extension.disabled,\n config: undefined as unknown,\n },\n })),\n ),\n ...builtinExtensions.map(extension => ({\n extension,\n params: {\n source: undefined,\n at: extension.at,\n disabled: extension.disabled,\n config: undefined as unknown,\n },\n })),\n ];\n\n for (const overrideParam of parameters) {\n const existingIndex = overrides.findIndex(\n e => e.extension.id === overrideParam.id,\n );\n if (existingIndex !== -1) {\n const existing = overrides[existingIndex];\n if (overrideParam.at) {\n existing.params.at = overrideParam.at;\n }\n if (overrideParam.config) {\n // TODO: merge config?\n existing.params.config = overrideParam.config;\n }\n if (\n Boolean(existing.params.disabled) !== Boolean(overrideParam.disabled)\n ) {\n existing.params.disabled = Boolean(overrideParam.disabled);\n if (!existing.params.disabled) {\n // bump\n overrides.splice(existingIndex, 1);\n overrides.push(existing);\n }\n }\n } else {\n throw new Error(`Extension ${overrideParam.id} does not exist`);\n }\n }\n\n return overrides\n .filter(override => !override.params.disabled)\n .map(param => ({\n extension: param.extension,\n at: param.params.at,\n source: param.params.source,\n config: param.params.config,\n }));\n}\n","/*\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 { RouteRef } from '@backstage/core-plugin-api';\nimport React, { createContext, ReactNode } from 'react';\n\nexport interface RoutingContextType {\n resolve(\n routeRef: RouteRef,\n options: { pathname: string },\n ): (() => string) | undefined;\n}\n\nexport const RoutingContext = createContext<RoutingContextType>({\n resolve: () => () => '',\n});\n\nexport class RouteResolver {\n constructor(private readonly routePaths: Map<RouteRef, string>) {}\n\n resolve(anyRouteRef: RouteRef<{}>): (() => string) | undefined {\n const basePath = this.routePaths.get(anyRouteRef);\n if (!basePath) {\n return undefined;\n }\n return () => basePath;\n }\n}\n\nexport function RoutingProvider(props: {\n routePaths: Map<RouteRef, string>;\n children?: ReactNode;\n}) {\n return (\n <RoutingContext.Provider value={new RouteResolver(props.routePaths)}>\n {props.children}\n </RoutingContext.Provider>\n );\n}\n","/*\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 { BackstagePlugin } from '@backstage/frontend-plugin-api';\n\ninterface DiscoveryGlobal {\n modules: Array<{ name: string; default: unknown }>;\n}\n\n/**\n * @public\n */\nexport function getAvailablePlugins(): BackstagePlugin[] {\n const discovered = (\n window as { '__@backstage/discovered__'?: DiscoveryGlobal }\n )['__@backstage/discovered__'];\n\n return (\n discovered?.modules.map(m => m.default).filter(isBackstagePlugin) ?? []\n );\n}\n\nfunction isBackstagePlugin(obj: unknown): obj is BackstagePlugin {\n if (obj !== null && typeof obj === 'object' && '$$type' in obj) {\n return obj.$$type === '@backstage/BackstagePlugin';\n }\n return false;\n}\n","/*\n * Copyright 2020 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, { useMemo, useEffect, useState, PropsWithChildren } from 'react';\nimport { useApi, appThemeApiRef, AppTheme } from '@backstage/core-plugin-api';\nimport useObservable from 'react-use/lib/useObservable';\n\n// This tries to find the most accurate match, but also falls back to less\n// accurate results in order to avoid errors.\nfunction resolveTheme(\n themeId: string | undefined,\n shouldPreferDark: boolean,\n themes: AppTheme[],\n) {\n if (themeId !== undefined) {\n const selectedTheme = themes.find(theme => theme.id === themeId);\n if (selectedTheme) {\n return selectedTheme;\n }\n }\n\n if (shouldPreferDark) {\n const darkTheme = themes.find(theme => theme.variant === 'dark');\n if (darkTheme) {\n return darkTheme;\n }\n }\n\n const lightTheme = themes.find(theme => theme.variant === 'light');\n if (lightTheme) {\n return lightTheme;\n }\n\n return themes[0];\n}\n\nconst useShouldPreferDarkTheme = () => {\n const mediaQuery = useMemo(\n () => window.matchMedia('(prefers-color-scheme: dark)'),\n [],\n );\n const [shouldPreferDark, setPrefersDark] = useState(mediaQuery.matches);\n\n useEffect(() => {\n const listener = (event: MediaQueryListEvent) => {\n setPrefersDark(event.matches);\n };\n mediaQuery.addListener(listener);\n return () => {\n mediaQuery.removeListener(listener);\n };\n }, [mediaQuery]);\n\n return shouldPreferDark;\n};\n\nexport function AppThemeProvider({ children }: PropsWithChildren<{}>) {\n const appThemeApi = useApi(appThemeApiRef);\n const themeId = useObservable(\n appThemeApi.activeThemeId$(),\n appThemeApi.getActiveThemeId(),\n );\n\n // Browser feature detection won't change over time, so ignore lint rule\n const shouldPreferDark = Boolean(window.matchMedia)\n ? useShouldPreferDarkTheme() // eslint-disable-line react-hooks/rules-of-hooks\n : false;\n\n const appTheme = resolveTheme(\n themeId,\n shouldPreferDark,\n appThemeApi.getInstalledThemes(),\n );\n if (!appTheme) {\n throw new Error('App has no themes');\n }\n\n return <appTheme.Provider children={children} />;\n}\n","/*\n * Copyright 2020 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, { PropsWithChildren } from 'react';\nimport {\n createVersionedValueMap,\n createVersionedContext,\n} from '@backstage/version-bridge';\nimport { AppContext as AppContextV1 } from './types';\n\nconst AppContext = createVersionedContext<{ 1: AppContextV1 }>('app-context');\n\ntype Props = {\n appContext: AppContextV1;\n};\n\nexport const AppContextProvider = ({\n appContext,\n children,\n}: PropsWithChildren<Props>) => {\n const versionedValue = createVersionedValueMap({ 1: appContext });\n\n return <AppContext.Provider value={versionedValue} children={children} />;\n};\n","/*\n * Copyright 2020 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 {\n FeatureFlagState,\n FeatureFlagsApi,\n FeatureFlag,\n FeatureFlagsSaveOptions,\n} from '@backstage/core-plugin-api';\n\nexport function validateFlagName(name: string): void {\n if (name.length < 3) {\n throw new Error(\n `The '${name}' feature flag must have a minimum length of three characters.`,\n );\n }\n\n if (name.length > 150) {\n throw new Error(\n `The '${name}' feature flag must not exceed 150 characters.`,\n );\n }\n\n if (!name.match(/^[a-z]+[a-z0-9-]+$/)) {\n throw new Error(\n `The '${name}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. ` +\n 'Examples: feature-flag-one, alpha, release-2020',\n );\n }\n}\n\n/**\n * A feature flags implementation that stores the flags in the browser's local\n * storage.\n *\n * @public\n */\nexport class LocalStorageFeatureFlags implements FeatureFlagsApi {\n private registeredFeatureFlags: FeatureFlag[] = [];\n private flags?: Map<string, FeatureFlagState>;\n\n registerFlag(flag: FeatureFlag) {\n validateFlagName(flag.name);\n this.registeredFeatureFlags.push(flag);\n }\n\n getRegisteredFlags(): FeatureFlag[] {\n return this.registeredFeatureFlags.slice();\n }\n\n isActive(name: string): boolean {\n if (!this.flags) {\n this.flags = this.load();\n }\n return this.flags.get(name) === FeatureFlagState.Active;\n }\n\n save(options: FeatureFlagsSaveOptions): void {\n if (!this.flags) {\n this.flags = this.load();\n }\n if (!options.merge) {\n this.flags.clear();\n }\n for (const [name, state] of Object.entries(options.states)) {\n this.flags.set(name, state);\n }\n\n const enabled = Array.from(this.flags.entries()).filter(\n ([, state]) => state === FeatureFlagState.Active,\n );\n window.localStorage.setItem(\n 'featureFlags',\n JSON.stringify(Object.fromEntries(enabled)),\n );\n }\n\n private load(): Map<string, FeatureFlagState> {\n try {\n const jsonStr = window.localStorage.getItem('featureFlags');\n if (!jsonStr) {\n return new Map();\n }\n const json = JSON.parse(jsonStr) as unknown;\n if (typeof json !== 'object' || json === null || Array.isArray(json)) {\n return new Map();\n }\n\n const entries = Object.entries(json).filter(([name, value]) => {\n validateFlagName(name);\n return value === FeatureFlagState.Active;\n });\n\n return new Map(entries);\n } catch {\n return new Map();\n }\n }\n}\n","/*\n * Copyright 2020 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 { AppConfig } from '@backstage/config';\nimport { JsonObject } from '@backstage/types';\nimport { AppConfigLoader } from './types';\n\n/**\n * The default config loader, which expects that config is available at compile-time\n * in `process.env.APP_CONFIG`. APP_CONFIG should be an array of config objects as\n * returned by the config loader.\n *\n * It will also load runtime config from the __APP_INJECTED_RUNTIME_CONFIG__ string,\n * which can be rewritten at runtime to contain an additional JSON config object.\n * If runtime config is present, it will be placed first in the config array, overriding\n * other config values.\n *\n * @public\n */\nexport const defaultConfigLoader: AppConfigLoader = async () =>\n defaultConfigLoaderSync();\n\n/** @internal */\nexport function defaultConfigLoaderSync(\n // This string may be replaced at runtime to provide additional config.\n // It should be replaced by a JSON-serialized config object.\n // It's a param so we can test it, but at runtime this will always fall back to default.\n runtimeConfigJson: string = '__APP_INJECTED_RUNTIME_CONFIG__',\n) {\n const appConfig = process.env.APP_CONFIG;\n if (!appConfig) {\n throw new Error('No static configuration provided');\n }\n if (!Array.isArray(appConfig)) {\n throw new Error('Static configuration has invalid format');\n }\n const configs = appConfig.slice() as unknown as AppConfig[];\n\n // Avoiding this string also being replaced at runtime\n if (\n runtimeConfigJson !==\n '__app_injected_runtime_config__'.toLocaleUpperCase('en-US')\n ) {\n try {\n const data = JSON.parse(runtimeConfigJson) as JsonObject;\n if (Array.isArray(data)) {\n configs.push(...data);\n } else {\n configs.push({ data, context: 'env' });\n }\n } catch (error) {\n throw new Error(`Failed to load runtime configuration, ${error}`);\n }\n }\n\n const windowAppConfig = (window as any).__APP_CONFIG__;\n if (windowAppConfig) {\n configs.push({\n context: 'window',\n data: windowAppConfig,\n });\n }\n return configs;\n}\n","/*\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 { AppConfig, ConfigReader } from '@backstage/config';\n\n/**\n * Creates a base URL that uses to the current document origin.\n */\nfunction createLocalBaseUrl(fullUrl: string): string {\n const url = new URL(fullUrl);\n url.protocol = document.location.protocol;\n url.hostname = document.location.hostname;\n url.port = document.location.port;\n return url.toString().replace(/\\/$/, '');\n}\n\n/**\n * If we are able to override the app and backend base URLs to values that\n * match the origin of the current location, then this function returns a\n * new array of app configs that contain the overrides.\n *\n * @internal\n */\nexport function overrideBaseUrlConfigs(inputConfigs: AppConfig[]): AppConfig[] {\n const urlConfigReader = ConfigReader.fromConfigs(inputConfigs);\n\n // In tests we may not have `app.baseUrl` or `backend.baseUrl`, to keep them optional\n const appBaseUrl = urlConfigReader.getOptionalString('app.baseUrl');\n const backendBaseUrl = urlConfigReader.getOptionalString('backend.baseUrl');\n\n let configs = inputConfigs;\n\n let newBackendBaseUrl: string | undefined = undefined;\n let newAppBaseUrl: string | undefined = undefined;\n\n if (appBaseUrl && backendBaseUrl) {\n const appOrigin = new URL(appBaseUrl).origin;\n const backendOrigin = new URL(backendBaseUrl).origin;\n\n if (appOrigin === backendOrigin) {\n const maybeNewBackendBaseUrl = createLocalBaseUrl(backendBaseUrl);\n if (backendBaseUrl !== maybeNewBackendBaseUrl) {\n newBackendBaseUrl = maybeNewBackendBaseUrl;\n }\n }\n }\n\n if (appBaseUrl) {\n const maybeNewAppBaseUrl = createLocalBaseUrl(appBaseUrl);\n if (appBaseUrl !== maybeNewAppBaseUrl) {\n newAppBaseUrl = maybeNewAppBaseUrl;\n }\n }\n\n // Only add the relative config if there is actually data to add.\n if (newAppBaseUrl || newBackendBaseUrl) {\n configs = configs.concat({\n data: {\n app: newAppBaseUrl && {\n baseUrl: newAppBaseUrl,\n },\n backend: newBackendBaseUrl && {\n baseUrl: newBackendBaseUrl,\n },\n },\n context: 'relative-resolver',\n });\n }\n\n return configs;\n}\n","/*\n * Copyright 2020 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 {\n AlertApiForwarder,\n NoOpAnalyticsApi,\n ErrorApiForwarder,\n ErrorAlerter,\n GoogleAuth,\n GithubAuth,\n OktaAuth,\n GitlabAuth,\n MicrosoftAuth,\n BitbucketAuth,\n BitbucketServerAuth,\n OAuthRequestManager,\n WebStorage,\n UrlPatternDiscovery,\n OneLoginAuth,\n UnhandledErrorForwarder,\n AtlassianAuth,\n createFetchApi,\n FetchMiddlewares,\n} from '@backstage/core-app-api';\n\nimport {\n createApiFactory,\n alertApiRef,\n analyticsApiRef,\n errorApiRef,\n discoveryApiRef,\n fetchApiRef,\n identityApiRef,\n oauthRequestApiRef,\n googleAuthApiRef,\n githubAuthApiRef,\n oktaAuthApiRef,\n gitlabAuthApiRef,\n microsoftAuthApiRef,\n storageApiRef,\n configApiRef,\n oneloginAuthApiRef,\n bitbucketAuthApiRef,\n bitbucketServerAuthApiRef,\n atlassianAuthApiRef,\n} from '@backstage/core-plugin-api';\nimport {\n permissionApiRef,\n IdentityPermissionApi,\n} from '@backstage/plugin-permission-react';\n\nexport const apis = [\n createApiFactory({\n api: discoveryApiRef,\n deps: { configApi: configApiRef },\n factory: ({ configApi }) =>\n UrlPatternDiscovery.compile(\n `${configApi.getString('backend.baseUrl')}/api/{{ pluginId }}`,\n ),\n }),\n createApiFactory({\n api: alertApiRef,\n deps: {},\n factory: () => new AlertApiForwarder(),\n }),\n createApiFactory({\n api: analyticsApiRef,\n deps: {},\n factory: () => new NoOpAnalyticsApi(),\n }),\n createApiFactory({\n api: errorApiRef,\n deps: { alertApi: alertApiRef },\n factory: ({ alertApi }) => {\n const errorApi = new ErrorAlerter(alertApi, new ErrorApiForwarder());\n UnhandledErrorForwarder.forward(errorApi, { hidden: false });\n return errorApi;\n },\n }),\n createApiFactory({\n api: storageApiRef,\n deps: { errorApi: errorApiRef },\n factory: ({ errorApi }) => WebStorage.create({ errorApi }),\n }),\n createApiFactory({\n api: fetchApiRef,\n deps: {\n configApi: configApiRef,\n identityApi: identityApiRef,\n discoveryApi: discoveryApiRef,\n },\n factory: ({ configApi, identityApi, discoveryApi }) => {\n return createFetchApi({\n middleware: [\n FetchMiddlewares.resolvePluginProtocol({\n discoveryApi,\n }),\n FetchMiddlewares.injectIdentityAuth({\n identityApi,\n config: configApi,\n }),\n ],\n });\n },\n }),\n createApiFactory({\n api: oauthRequestApiRef,\n deps: {},\n factory: () => new OAuthRequestManager(),\n }),\n createApiFactory({\n api: googleAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n GoogleAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n createApiFactory({\n api: microsoftAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n MicrosoftAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n createApiFactory({\n api: githubAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n GithubAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n defaultScopes: ['read:user'],\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n createApiFactory({\n api: oktaAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n OktaAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n createApiFactory({\n api: gitlabAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n GitlabAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n createApiFactory({\n api: oneloginAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n OneLoginAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n createApiFactory({\n api: bitbucketAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n BitbucketAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n defaultScopes: ['team'],\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n createApiFactory({\n api: bitbucketServerAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n BitbucketServerAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n defaultScopes: ['REPO_READ'],\n }),\n }),\n createApiFactory({\n api: atlassianAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) => {\n return AtlassianAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n });\n },\n }),\n createApiFactory({\n api: permissionApiRef,\n deps: {\n discovery: discoveryApiRef,\n identity: identityApiRef,\n config: configApiRef,\n },\n factory: ({ config, discovery, identity }) =>\n IdentityPermissionApi.create({ config, discovery, identity }),\n }),\n];\n","/*\n * Copyright 2021 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, { ReactNode } from 'react';\nimport Button from '@material-ui/core/Button';\nimport { ErrorPanel, Progress, ErrorPage } from '@backstage/core-components';\nimport {\n MemoryRouter,\n useInRouterContext,\n BrowserRouter,\n} from 'react-router-dom';\nimport {\n AppComponents,\n BootErrorPageProps,\n ErrorBoundaryFallbackProps,\n} from '@backstage/core-plugin-api';\n\nexport function OptionallyWrapInRouter({ children }: { children: ReactNode }) {\n if (useInRouterContext()) {\n return <>{children}</>;\n }\n return <MemoryRouter>{children}</MemoryRouter>;\n}\n\nconst DefaultNotFoundPage = () => (\n <ErrorPage status=\"404\" statusMessage=\"PAGE NOT FOUND\" />\n);\n\nconst DefaultBootErrorPage = ({ step, error }: BootErrorPageProps) => {\n let message = '';\n if (step === 'load-config') {\n message = `The configuration failed to load, someone should have a look at this error: ${error.message}`;\n } else if (step === 'load-chunk') {\n message = `Lazy loaded chunk failed to load, try to reload the page: ${error.message}`;\n }\n // TODO: figure out a nicer way to handle routing on the error page, when it can be done.\n return (\n <OptionallyWrapInRouter>\n <ErrorPage status=\"501\" statusMessage={message} />\n </OptionallyWrapInRouter>\n );\n};\n\nconst DefaultErrorBoundaryFallback = ({\n error,\n resetError,\n plugin,\n}: ErrorBoundaryFallbackProps) => {\n return (\n <ErrorPanel\n title={`Error in ${plugin?.getId()}`}\n defaultExpanded\n error={error}\n >\n <Button variant=\"outlined\" onClick={resetError}>\n Retry\n </Button>\n </ErrorPanel>\n );\n};\n\n/**\n * Creates a set of default components to pass along to {@link @backstage/core-app-api#createSpecializedApp}.\n *\n * @public\n */\nexport const components: AppComponents = {\n Progress,\n Router: BrowserRouter,\n NotFoundErrorPage: DefaultNotFoundPage,\n BootErrorPage: DefaultBootErrorPage,\n ErrorBoundaryFallback: DefaultErrorBoundaryFallback,\n};\n","/*\n * Copyright 2020 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 { IconComponent } from '@backstage/core-plugin-api';\nimport MuiApartmentIcon from '@material-ui/icons/Apartment';\nimport MuiBrokenImageIcon from '@material-ui/icons/BrokenImage';\nimport MuiCategoryIcon from '@material-ui/icons/Category';\nimport MuiCreateNewFolderIcon from '@material-ui/icons/CreateNewFolder';\nimport MuiSubjectIcon from '@material-ui/icons/Subject';\nimport MuiSearchIcon from '@material-ui/icons/Search';\nimport MuiChatIcon from '@material-ui/icons/Chat';\nimport MuiDashboardIcon from '@material-ui/icons/Dashboard';\nimport MuiDocsIcon from '@material-ui/icons/Description';\nimport MuiEmailIcon from '@material-ui/icons/Email';\nimport MuiExtensionIcon from '@material-ui/icons/Extension';\nimport MuiGitHubIcon from '@material-ui/icons/GitHub';\nimport MuiHelpIcon from '@material-ui/icons/Help';\nimport MuiLocationOnIcon from '@material-ui/icons/LocationOn';\nimport MuiMemoryIcon from '@material-ui/icons/Memory';\nimport MuiMenuBookIcon from '@material-ui/icons/MenuBook';\nimport MuiPeopleIcon from '@material-ui/icons/People';\nimport MuiPersonIcon from '@material-ui/icons/Person';\nimport MuiWarningIcon from '@material-ui/icons/Warning';\nimport MuiWorkIcon from '@material-ui/icons/Work';\n\nexport const icons = {\n brokenImage: MuiBrokenImageIcon as IconComponent,\n // To be confirmed: see https://github.com/backstage/backstage/issues/4970\n catalog: MuiMenuBookIcon as IconComponent,\n scaffolder: MuiCreateNewFolderIcon as IconComponent,\n techdocs: MuiSubjectIcon as IconComponent,\n search: MuiSearchIcon as IconComponent,\n chat: MuiChatIcon as IconComponent,\n dashboard: MuiDashboardIcon as IconComponent,\n docs: MuiDocsIcon as IconComponent,\n email: MuiEmailIcon as IconComponent,\n github: MuiGitHubIcon as IconComponent,\n group: MuiPeopleIcon as IconComponent,\n help: MuiHelpIcon as IconComponent,\n 'kind:api': MuiExtensionIcon as IconComponent,\n 'kind:component': MuiMemoryIcon as IconComponent,\n 'kind:domain': MuiApartmentIcon as IconComponent,\n 'kind:group': MuiPeopleIcon as IconComponent,\n 'kind:location': MuiLocationOnIcon as IconComponent,\n 'kind:system': MuiCategoryIcon as IconComponent,\n 'kind:user': MuiPersonIcon as IconComponent,\n 'kind:resource': MuiWorkIcon as IconComponent,\n user: MuiPersonIcon as IconComponent,\n warning: MuiWarningIcon as IconComponent,\n};\n","/*\n * Copyright 2021 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 from 'react';\nimport {\n UnifiedThemeProvider,\n themes as builtinThemes,\n} from '@backstage/theme';\nimport DarkIcon from '@material-ui/icons/Brightness2';\nimport LightIcon from '@material-ui/icons/WbSunny';\nimport { AppTheme } from '@backstage/core-plugin-api';\n\nexport const themes: AppTheme[] = [\n {\n id: 'light',\n title: 'Light Theme',\n variant: 'light',\n icon: <LightIcon />,\n Provider: ({ children }) => (\n <UnifiedThemeProvider theme={builtinThemes.light} children={children} />\n ),\n },\n {\n id: 'dark',\n title: 'Dark Theme',\n variant: 'dark',\n icon: <DarkIcon />,\n Provider: ({ children }) => (\n <UnifiedThemeProvider theme={builtinThemes.dark} children={children} />\n ),\n },\n];\n","/*\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, Config } from '@backstage/config';\nimport {\n BackstagePlugin,\n coreExtensionData,\n ExtensionDataRef,\n} from '@backstage/frontend-plugin-api';\nimport { Core } from '../extensions/Core';\nimport { CoreRoutes } from '../extensions/CoreRoutes';\nimport { CoreLayout } from '../extensions/CoreLayout';\nimport { CoreNav } from '../extensions/CoreNav';\nimport {\n createExtensionInstance,\n ExtensionInstance,\n} from './createExtensionInstance';\nimport {\n ExtensionInstanceParameters,\n mergeExtensionParameters,\n readAppExtensionParameters,\n} from './parameters';\nimport { RoutingProvider } from '../routing/RoutingContext';\nimport {\n AnyApiFactory,\n ApiHolder,\n AppComponents,\n AppContext,\n appThemeApiRef,\n ConfigApi,\n configApiRef,\n IconComponent,\n RouteRef,\n BackstagePlugin as LegacyBackstagePlugin,\n featureFlagsApiRef,\n attachComponentData,\n useRouteRef,\n} from '@backstage/core-plugin-api';\nimport { getAvailablePlugins } from './discovery';\nimport {\n ApiFactoryRegistry,\n ApiProvider,\n ApiResolver,\n AppThemeSelector,\n} from '@backstage/core-app-api';\n\n// TODO: Get rid of all of these\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { AppThemeProvider } from '../../../core-app-api/src/app/AppThemeProvider';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { AppContextProvider } from '../../../core-app-api/src/app/AppContext';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { LocalStorageFeatureFlags } from '../../../core-app-api/src/apis/implementations/FeatureFlagsApi/LocalStorageFeatureFlags';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { defaultConfigLoaderSync } from '../../../core-app-api/src/app/defaultConfigLoader';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { overrideBaseUrlConfigs } from '../../../core-app-api/src/app/overrideBaseUrlConfigs';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport {\n apis as defaultApis,\n components as defaultComponents,\n icons as defaultIcons,\n themes as defaultThemes,\n} from '../../../app-defaults/src/defaults';\nimport { BrowserRouter, Route } from 'react-router-dom';\nimport { SidebarItem } from '@backstage/core-components';\n\n/** @public */\nexport interface ExtensionTreeNode {\n id: string;\n getData<T>(ref: ExtensionDataRef<T>): T | undefined;\n}\n\n/** @public */\nexport interface ExtensionTree {\n getExtension(id: string): ExtensionTreeNode | undefined;\n getExtensionAttachments(id: string, inputName: string): ExtensionTreeNode[];\n getRootRoutes(): JSX.Element[];\n getSidebarItems(): JSX.Element[];\n}\n\n/** @public */\nexport function createExtensionTree(options: {\n config: Config;\n}): ExtensionTree {\n const plugins = getAvailablePlugins();\n const { instances } = createInstances({\n plugins,\n config: options.config,\n });\n\n return {\n getExtension(id: string): ExtensionTreeNode | undefined {\n return instances.get(id);\n },\n getExtensionAttachments(\n id: string,\n inputName: string,\n ): ExtensionTreeNode[] {\n return instances.get(id)?.attachments.get(inputName) ?? [];\n },\n getRootRoutes(): JSX.Element[] {\n return this.getExtensionAttachments('core.routes', 'routes').map(node => {\n const path = node.getData(coreExtensionData.routePath);\n const element = node.getData(coreExtensionData.reactElement);\n const routeRef = node.getData(coreExtensionData.routeRef);\n if (!path || !element) {\n throw new Error(`Invalid route extension: ${node.id}`);\n }\n const Component = () => {\n return element;\n };\n attachComponentData(Component, 'core.mountPoint', routeRef);\n\n return <Route path={path} element={<Component />} />;\n });\n },\n getSidebarItems(): JSX.Element[] {\n const RoutedSidebarItem = (props: {\n title: string;\n routeRef: RouteRef;\n icon: IconComponent;\n }): React.JSX.Element => {\n const location = useRouteRef(props.routeRef);\n return (\n <SidebarItem icon={props.icon} to={location()} text={props.title} />\n );\n };\n\n return this.getExtensionAttachments('core.nav', 'items')\n .map((node, index) => {\n const target = node.getData(coreExtensionData.navTarget);\n if (!target) {\n return null;\n }\n return (\n <RoutedSidebarItem\n key={index}\n title={target.title}\n icon={target.icon}\n routeRef={target.routeRef}\n />\n );\n })\n .filter((x): x is JSX.Element => !!x);\n },\n };\n}\n\n/**\n * @internal\n */\nexport function createInstances(options: {\n plugins: BackstagePlugin[];\n config: Config;\n}) {\n const builtinExtensions = [Core, CoreRoutes, CoreNav, CoreLayout];\n\n // pull in default extension instance from discovered packages\n // apply config to adjust default extension instances and add more\n const extensionParams = mergeExtensionParameters({\n sources: options.plugins,\n builtinExtensions,\n parameters: readAppExtensionParameters(options.config),\n });\n\n // TODO: validate the config of all extension instances\n // We do it at this point to ensure that merging (if any) of config has already happened\n\n // Create attachment map so that we can look attachments up during instance creation\n const attachmentMap = new Map<\n string,\n Map<string, ExtensionInstanceParameters[]>\n >();\n for (const instanceParams of extensionParams) {\n const [extensionId, pointId = 'default'] = instanceParams.at.split('/');\n\n let pointMap = attachmentMap.get(extensionId);\n if (!pointMap) {\n pointMap = new Map();\n attachmentMap.set(extensionId, pointMap);\n }\n\n let instances = pointMap.get(pointId);\n if (!instances) {\n instances = [];\n pointMap.set(pointId, instances);\n }\n\n instances.push(instanceParams);\n }\n\n const instances = new Map<string, ExtensionInstance>();\n\n function createInstance(\n instanceParams: ExtensionInstanceParameters,\n ): ExtensionInstance {\n const existingInstance = instances.get(instanceParams.extension.id);\n if (existingInstance) {\n return existingInstance;\n }\n\n const attachments = new Map(\n Array.from(\n attachmentMap.get(instanceParams.extension.id)?.entries() ?? [],\n ).map(([inputName, attachmentConfigs]) => [\n inputName,\n attachmentConfigs.map(createInstance),\n ]),\n );\n\n const newInstance = createExtensionInstance({\n extension: instanceParams.extension,\n source: instanceParams.source,\n config: instanceParams.config,\n attachments,\n });\n\n instances.set(instanceParams.extension.id, newInstance);\n\n return newInstance;\n }\n\n const rootConfigs = attachmentMap.get('root')?.get('default') ?? [];\n\n const rootInstances = rootConfigs.map(instanceParams =>\n createInstance(instanceParams),\n );\n\n return { instances, rootInstances };\n}\n\n/** @public */\nexport function createApp(options: {\n plugins: BackstagePlugin[];\n config?: ConfigApi;\n}): {\n createRoot(): JSX.Element;\n} {\n const discoveredPlugins = getAvailablePlugins();\n const allPlugins = [...discoveredPlugins, ...options.plugins];\n const appConfig =\n options?.config ??\n ConfigReader.fromConfigs(overrideBaseUrlConfigs(defaultConfigLoaderSync()));\n\n const { rootInstances } = createInstances({\n plugins: allPlugins,\n config: appConfig,\n });\n\n const routePaths = extractRouteInfoFromInstanceTree(rootInstances);\n\n const coreInstance = rootInstances.find(({ id }) => id === 'core');\n if (!coreInstance) {\n throw Error('Unable to find core extension instance');\n }\n\n const apiHolder = createApiHolder(coreInstance, appConfig);\n\n const appContext = createLegacyAppContext(allPlugins);\n\n return {\n createRoot() {\n const rootElements = rootInstances\n .map(e => e.getData(coreExtensionData.reactElement))\n .filter((x): x is JSX.Element => !!x);\n return (\n <ApiProvider apis={apiHolder}>\n <AppContextProvider appContext={appContext}>\n <AppThemeProvider>\n <RoutingProvider routePaths={routePaths}>\n {/* TODO: set base path using the logic from AppRouter */}\n <BrowserRouter>{rootElements}</BrowserRouter>\n </RoutingProvider>\n </AppThemeProvider>\n </AppContextProvider>\n </ApiProvider>\n );\n },\n };\n}\n\nfunction toLegacyPlugin(plugin: BackstagePlugin): LegacyBackstagePlugin {\n const errorMsg = 'Not implemented in legacy plugin compatibility layer';\n const notImplemented = () => {\n throw new Error(errorMsg);\n };\n return {\n getId(): string {\n return plugin.id;\n },\n get routes(): never {\n throw new Error(errorMsg);\n },\n get externalRoutes(): never {\n throw new Error(errorMsg);\n },\n getApis: notImplemented,\n getFeatureFlags: notImplemented,\n provide: notImplemented,\n __experimentalReconfigure: notImplemented,\n };\n}\n\nfunction createLegacyAppContext(plugins: BackstagePlugin[]): AppContext {\n return {\n getPlugins(): LegacyBackstagePlugin[] {\n return plugins.map(toLegacyPlugin);\n },\n\n getSystemIcon(key: string): IconComponent | undefined {\n return key in defaultIcons\n ? defaultIcons[key as keyof typeof defaultIcons]\n : undefined;\n },\n\n getSystemIcons(): Record<string, IconComponent> {\n return defaultIcons;\n },\n\n getComponents(): AppComponents {\n return defaultComponents;\n },\n };\n}\n\nfunction createApiHolder(\n coreExtension: ExtensionInstance,\n configApi: ConfigApi,\n): ApiHolder {\n const factoryRegistry = new ApiFactoryRegistry();\n\n const apiFactories =\n coreExtension.attachments\n .get('apis')\n ?.map(e => e.getData(coreExtensionData.apiFactory))\n .filter((x): x is AnyApiFactory => !!x) ?? [];\n\n for (const factory of apiFactories) {\n factoryRegistry.register('default', factory);\n }\n\n // TODO: properly discovery feature flags, maybe rework the whole thing\n factoryRegistry.register('default', {\n api: featureFlagsApiRef,\n deps: {},\n factory: () => new LocalStorageFeatureFlags(),\n });\n\n factoryRegistry.register('static', {\n api: appThemeApiRef,\n deps: {},\n // TODO: add extension for registering themes\n factory: () => AppThemeSelector.createWithStorage(defaultThemes),\n });\n\n factoryRegistry.register('static', {\n api: configApiRef,\n deps: {},\n factory: () => configApi,\n });\n\n // TODO: ship these as default extensions instead\n for (const factory of defaultApis as AnyApiFactory[]) {\n if (!factoryRegistry.register('app', factory)) {\n throw new Error(\n `Duplicate or forbidden API factory for ${factory.api} in app`,\n );\n }\n }\n\n ApiResolver.validateFactories(factoryRegistry, factoryRegistry.getAllApis());\n\n return new ApiResolver(factoryRegistry);\n}\n\n/** @internal */\nexport function extractRouteInfoFromInstanceTree(\n roots: ExtensionInstance[],\n): Map<RouteRef, string> {\n const results = new Map<RouteRef, string>();\n\n function visit(current: ExtensionInstance, basePath: string) {\n const routePath = current.getData(coreExtensionData.routePath) ?? '';\n const routeRef = current.getData(coreExtensionData.routeRef);\n\n // TODO: join paths in a more robust way\n const fullPath = basePath + routePath;\n if (routeRef) {\n const routeRefId = (routeRef as any).id; // TODO: properly\n if (routeRefId !== current.id) {\n throw new Error(\n `Route ref '${routeRefId}' must have the same ID as extension '${current.id}'`,\n );\n }\n results.set(routeRef, fullPath);\n }\n\n for (const children of current.attachments.values()) {\n for (const child of children) {\n visit(child, fullPath);\n }\n }\n }\n\n for (const root of roots) {\n visit(root, '');\n }\n return results;\n}\n"],"names":["useStyles","id","builtinThemes","instances","_a","_b","defaultIcons","defaultComponents","defaultThemes","defaultApis"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBO,MAAM,OAAO,eAAgB,CAAA;AAAA,EAClC,EAAI,EAAA,MAAA;AAAA,EACJ,EAAI,EAAA,MAAA;AAAA,EACJ,MAAQ,EAAA;AAAA,IACN,MAAM,oBAAqB,CAAA;AAAA,MACzB,KAAK,iBAAkB,CAAA,UAAA;AAAA,KACxB,CAAA;AAAA,GACH;AAAA,EACA,QAAQ,EAAC;AAAA,EACT,OAAU,GAAA;AAAA,GAAC;AACb,CAAC,CAAA;;ACRM,MAAM,aAAa,eAAgB,CAAA;AAAA,EACxC,EAAI,EAAA,aAAA;AAAA,EACJ,EAAI,EAAA,qBAAA;AAAA,EACJ,MAAQ,EAAA;AAAA,IACN,QAAQ,oBAAqB,CAAA;AAAA,MAC3B,MAAM,iBAAkB,CAAA,SAAA;AAAA,MACxB,GAAA,EAAK,iBAAkB,CAAA,QAAA,CAAS,QAAS,EAAA;AAAA,MACzC,SAAS,iBAAkB,CAAA,YAAA;AAAA,KAC5B,CAAA;AAAA,GACH;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,SAAS,iBAAkB,CAAA,YAAA;AAAA,GAC7B;AAAA,EACA,OAAQ,CAAA,EAAE,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QAAA,MAAM,IAAI,KAAA;AAAA,UACR,CAAc,WAAA,EAAA,UAAU,CAAyC,sCAAA,EAAA,OAAA,CAAQ,EAAE,CAAA,CAAA,CAAA;AAAA,SAC7E,CAAA;AAAA,OACF;AACA,MAAQ,OAAA,CAAA,GAAA,CAAI,UAAU,QAAQ,CAAA,CAAA;AAAA,KAChC;AAEA,IAAA,KAAA,MAAW,QAAY,IAAA,OAAA,CAAQ,WAAY,CAAA,MAAA,EAAU,EAAA;AACnD,MAAA,KAAA,MAAW,SAAS,QAAU,EAAA;AAC5B,QAAA,KAAA,CAAM,OAAO,QAAQ,CAAA,CAAA;AAAA,OACvB;AAAA,KACF;AAAA,GACF;AAEA,EAAA,KAAA,MAAW,QAAQ,KAAO,EAAA;AACxB,IAAA,KAAA,CAAM,MAAM,EAAE,CAAA,CAAA;AAAA,GAChB;AACA,EAAO,OAAA,OAAA,CAAA;AACT;;;;"}
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../src/extensions/Core.tsx","../src/extensions/CoreRoutes.tsx","../src/extensions/CoreLayout.tsx","../../app/src/components/Root/LogoIcon.jsx","../../app/src/components/Root/LogoFull.tsx","../src/extensions/CoreNav.tsx","../src/wiring/createExtensionInstance.ts","../src/wiring/parameters.ts","../src/routing/RoutingContext.tsx","../src/wiring/discovery.ts","../../core-app-api/src/app/AppThemeProvider.tsx","../../core-app-api/src/apis/implementations/IdentityApi/AppIdentityProxy.ts","../../core-app-api/src/app/AppContext.tsx","../../core-app-api/src/apis/implementations/FeatureFlagsApi/LocalStorageFeatureFlags.tsx","../../core-app-api/src/app/defaultConfigLoader.ts","../../core-app-api/src/app/overrideBaseUrlConfigs.ts","../../app-defaults/src/defaults/apis.ts","../../app-defaults/src/defaults/components.tsx","../../app-defaults/src/defaults/icons.tsx","../src/extensions/themes.tsx","../src/wiring/createApp.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 {\n coreExtensionData,\n createExtension,\n createExtensionInput,\n} from '@backstage/frontend-plugin-api';\n\nexport const Core = createExtension({\n id: 'core',\n at: 'root',\n inputs: {\n apis: createExtensionInput({\n api: coreExtensionData.apiFactory,\n }),\n },\n output: {},\n factory() {},\n});\n","/*\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 from 'react';\nimport {\n createExtension,\n coreExtensionData,\n createExtensionInput,\n} from '@backstage/frontend-plugin-api';\nimport { useRoutes } from 'react-router-dom';\n\nexport const CoreRoutes = createExtension({\n id: 'core.routes',\n at: 'core.layout/content',\n inputs: {\n routes: createExtensionInput({\n path: coreExtensionData.routePath,\n ref: coreExtensionData.routeRef.optional(),\n element: coreExtensionData.reactElement,\n }),\n },\n output: {\n element: coreExtensionData.reactElement,\n },\n factory({ bind, inputs }) {\n const Routes = () => {\n const element = useRoutes(\n inputs.routes.map(route => ({\n path: route.path,\n element: route.element,\n })),\n );\n\n return element;\n };\n bind({\n element: <Routes />,\n });\n },\n});\n","/*\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 from 'react';\nimport {\n createExtension,\n coreExtensionData,\n createExtensionInput,\n} from '@backstage/frontend-plugin-api';\nimport { SidebarPage } from '@backstage/core-components';\n\nexport const CoreLayout = createExtension({\n id: 'core.layout',\n at: 'root',\n inputs: {\n nav: createExtensionInput(\n {\n element: coreExtensionData.reactElement,\n },\n { singleton: true },\n ),\n content: createExtensionInput(\n {\n element: coreExtensionData.reactElement,\n },\n { singleton: true },\n ),\n },\n output: {\n element: coreExtensionData.reactElement,\n },\n factory({ bind, inputs }) {\n bind({\n element: (\n <SidebarPage>\n {inputs.nav.element}\n {inputs.content.element}\n </SidebarPage>\n ),\n });\n },\n});\n","/*\n * Copyright 2020 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// @ts-check\n// NOTE: This file is intentionally .jsx, so that there is one file in this repo where we make sure .jsx files work.\n\nimport React from 'react';\nimport { makeStyles } from '@material-ui/core';\n\nconst useStyles = makeStyles({\n svg: {\n width: 'auto',\n height: 28,\n },\n path: {\n fill: '#7df3e1',\n },\n});\n\nconst LogoIcon = () => {\n const classes = useStyles();\n\n return (\n <svg\n className={classes.svg}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 337.46 428.5\"\n >\n <path\n className={classes.path}\n d=\"M303,166.05a80.69,80.69,0,0,0,13.45-10.37c.79-.77,1.55-1.53,2.3-2.3a83.12,83.12,0,0,0,7.93-9.38A63.69,63.69,0,0,0,333,133.23a48.58,48.58,0,0,0,4.35-16.4c1.49-19.39-10-38.67-35.62-54.22L198.56,0,78.3,115.23,0,190.25l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.22,49.22,0,0,0-6.8-8.87A89.17,89.17,0,0,0,259,178.29h.15a85.08,85.08,0,0,0,31-5.79A80.88,80.88,0,0,0,303,166.05ZM202.45,225.86c-19.32,18.51-50.4,21.23-75.7,5.9L51.61,186.15l67.45-64.64,76.41,46.38C223,184.58,221.49,207.61,202.45,225.86Zm8.93-82.22-70.65-42.89L205.14,39,274.51,81.1c25.94,15.72,29.31,37,10.55,55A60.69,60.69,0,0,1,211.38,143.64Zm29.86,190c-19.57,18.75-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,282.52v24.67L108.6,373.1a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.27,87.27,0,0,1,241.24,333.68Zm0-39c-19.57,18.75-46.17,29.08-74.88,29.08a123.81,123.81,0,0,1-64.1-18.19L0,243.53v24.68l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.5v-1.78A87.27,87.27,0,0,1,241.24,294.7Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.81,123.81,0,0,1-64.1-18.19L0,204.55v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.82A86.09,86.09,0,0,1,241.24,255.71Zm83.7,25.74a94.15,94.15,0,0,1-60.2,25.86h0V334a81.6,81.6,0,0,0,51.74-22.37c14-13.38,21.14-28.11,21-42.64v-2.19A94.92,94.92,0,0,1,324.94,281.45Zm-83.7,91.21c-19.57,18.76-46.17,29.09-74.88,29.09a123.73,123.73,0,0,1-64.1-18.2L0,321.5v24.68l108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A86.29,86.29,0,0,1,241.24,372.66ZM327,162.45c-.68.69-1.35,1.38-2.05,2.06a94.37,94.37,0,0,1-10.64,8.65,91.35,91.35,0,0,1-11.6,7,94.53,94.53,0,0,1-26.24,8.71,97.69,97.69,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a53.27,53.27,0,0,1,1.14,12V217h.05a84.41,84.41,0,0,0,25.35-5.55,81,81,0,0,0,26.39-16.82c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,172.17a48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7V150q-1.08,1.54-2.25,3.09A96.73,96.73,0,0,1,327,162.45Zm0,77.92c-.69.7-1.31,1.41-2,2.1a94.2,94.2,0,0,1-60.2,25.86h0l0,26.67h0a81.6,81.6,0,0,0,51.74-22.37A73.51,73.51,0,0,0,333,250.13a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.47.19-3.71v-2.19c-.74,1.07-1.46,2.15-2.27,3.21A95.68,95.68,0,0,1,327,240.37Zm0-39c-.69.7-1.31,1.41-2,2.1a93.18,93.18,0,0,1-10.63,8.65,91.63,91.63,0,0,1-11.63,7,95.47,95.47,0,0,1-37.94,10.18h0V256h0a81.65,81.65,0,0,0,51.74-22.37c.8-.77,1.5-1.56,2.26-2.34a82.08,82.08,0,0,0,7.93-9.38A63.76,63.76,0,0,0,333,211.15a48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.46,2.16-2.27,3.22A95.68,95.68,0,0,1,327,201.39Z\"\n />\n </svg>\n );\n};\n\nexport default LogoIcon;\n","/*\n * Copyright 2020 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 from 'react';\nimport { makeStyles } from '@material-ui/core';\n\nconst useStyles = makeStyles({\n svg: {\n width: 'auto',\n height: 30,\n },\n path: {\n fill: '#7df3e1',\n },\n});\nconst LogoFull = () => {\n const classes = useStyles();\n\n return (\n <svg\n className={classes.svg}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 2079.95 456.05\"\n >\n <path\n className={classes.path}\n d=\"M302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Zm241-88.84q7.94,0,17.09.17t18.12,1a139.3,139.3,0,0,1,16.74,2.57,42.78,42.78,0,0,1,13.3,5.14,64.27,64.27,0,0,1,20.54,19.89Q662,168,662,186.54q0,19.54-9.49,33.78t-27.1,21.09v.68q22.78,4.82,34.87,20.58t12.08,38.4a72.62,72.62,0,0,1-4.83,26.06,65.29,65.29,0,0,1-14.33,22.46,71.57,71.57,0,0,1-23.47,15.78q-14,6-32.28,6H478.38V126.54Zm9,105.27q28,0,40.21-9.78t12.26-29.31q0-13-4.14-20.58a29.47,29.47,0,0,0-11.4-11.66A45,45,0,0,0,597,155.17a161.2,161.2,0,0,0-20.19-1.2h-65.6v77.84Zm16.57,112.13q21.74,0,34-11.66T639.59,300q0-12-4.48-19.88a34.85,34.85,0,0,0-11.91-12.52,50.14,50.14,0,0,0-17.09-6.52,105,105,0,0,0-20-1.88H511.17v84.7Zm274.79,26.74q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58A41.19,41.19,0,0,1,705,348.56q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.08-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7T736.6,249.29H707.26q.69-16.46,6.9-27.77a52.21,52.21,0,0,1,16.57-18.35,70,70,0,0,1,23.65-10.11A125.51,125.51,0,0,1,782.86,190a168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7A41.23,41.23,0,0,1,844,213.59q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-18,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.5,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14ZM1002.07,225q-11.05-9.25-29.69-9.26-15.89,0-26.58,5.83A47.29,47.29,0,0,0,928.71,237a64.66,64.66,0,0,0-9.15,22.12A119.83,119.83,0,0,0,916.8,285a98.22,98.22,0,0,0,2.93,24,64.18,64.18,0,0,0,9.15,20.74,46.2,46.2,0,0,0,16.23,14.58q10,5.49,23.82,5.48,21.75,0,34-11.31t15-31.89h30q-4.83,32.91-24.68,50.75t-54,17.83q-20.37,0-36.07-6.52A69.86,69.86,0,0,1,907,350.11a79.92,79.92,0,0,1-15.88-28.63A118.64,118.64,0,0,1,885.73,285a129.41,129.41,0,0,1,5.18-37.21,85.63,85.63,0,0,1,15.71-30.17A73.46,73.46,0,0,1,933,197.35Q948.91,190,970,190a108.54,108.54,0,0,1,28.48,3.6,69.59,69.59,0,0,1,23.48,11.15,61,61,0,0,1,16.74,19q6.55,11.49,8.29,27.26h-30.38Q1013.11,234.21,1002.07,225Zm109.77-98.41v145l81.47-77.49h39.36l-70.77,64.46,75.95,112.82h-37.29l-61.1-92.59-27.62,25.38v67.21H1082.5V126.54Zm170.54,205.22a31.07,31.07,0,0,0,10.87,10.63,49,49,0,0,0,15.19,5.66,87.06,87.06,0,0,0,17.44,1.71,109.18,109.18,0,0,0,14.5-1,53.22,53.22,0,0,0,14-3.78,26.27,26.27,0,0,0,10.53-8q4.14-5.32,4.14-13.55,0-11.31-8.63-17.14a73.69,73.69,0,0,0-21.58-9.43q-12.94-3.6-28.13-6.52a146,146,0,0,1-28.14-8.23A58.16,58.16,0,0,1,1261,267.13q-8.64-9.6-8.63-26.75,0-13.38,6-23a49.26,49.26,0,0,1,15.53-15.61,71.76,71.76,0,0,1,21.4-8.91A99.41,99.41,0,0,1,1319,190a141.31,141.31,0,0,1,28,2.58,64.85,64.85,0,0,1,22.62,8.91,46.16,46.16,0,0,1,15.7,17.15q5.87,10.8,6.91,26.91h-29.35q-.69-8.57-4.48-14.23a29.36,29.36,0,0,0-9.67-9.08,44.16,44.16,0,0,0-12.94-5,67.68,67.68,0,0,0-14.33-1.54,87.29,87.29,0,0,0-13.29,1,45.28,45.28,0,0,0-12.26,3.6,24.49,24.49,0,0,0-9,6.86q-3.46,4.29-3.46,11.14a16.32,16.32,0,0,0,5.36,12.52,42.75,42.75,0,0,0,13.63,8.23,120,120,0,0,0,18.64,5.48q10.37,2.24,20.72,4.63,11,2.4,21.57,5.83A70.74,70.74,0,0,1,1382,284.1a44.55,44.55,0,0,1,13.12,14.23q5,8.58,5,21.26,0,16.13-6.73,26.75a52.5,52.5,0,0,1-17.61,17.14,73.89,73.89,0,0,1-24.51,9.09,146.3,146.3,0,0,1-27.1,2.57,126.24,126.24,0,0,1-28.31-3.09A69.56,69.56,0,0,1,1272,361.94a51.74,51.74,0,0,1-16.57-18.52q-6.21-11.49-6.9-27.95h29.34A32.65,32.65,0,0,0,1282.38,331.76Zm226.46-137.67v25.72h-35.56V329.88a31.37,31.37,0,0,0,.87,8.23,8.42,8.42,0,0,0,3.28,4.8,14.61,14.61,0,0,0,6.73,2.23,99.19,99.19,0,0,0,11.22.51h13.46v25.72H1486.4a105.8,105.8,0,0,1-19.5-1.55,28.65,28.65,0,0,1-13.12-5.65,24.09,24.09,0,0,1-7.42-11.66q-2.43-7.54-2.42-19.89V219.81h-30.38V194.09h30.38V140.94h29.34v53.15ZM1699.4,370.68q-7.61,4.45-21.06,4.46-11.4,0-18.12-6.34t-6.74-20.75a70.17,70.17,0,0,1-28.13,20.75,97.87,97.87,0,0,1-57.65,3.6,53.51,53.51,0,0,1-18.82-8.58,41.19,41.19,0,0,1-12.6-15.26q-4.65-9.42-4.66-22.8,0-15.09,5.18-24.69a44.92,44.92,0,0,1,13.64-15.6,62.63,62.63,0,0,1,19.33-9.09q10.88-3.08,22.27-5.14,12.07-2.4,23-3.6a128,128,0,0,0,19.16-3.43c5.53-1.48,9.89-3.65,13.12-6.51s4.83-7,4.83-12.52q0-9.6-3.62-15.43a24.94,24.94,0,0,0-9.32-8.92,38.38,38.38,0,0,0-12.78-4.11,96.54,96.54,0,0,0-14-1q-18.63,0-31.07,7t-13.46,26.57h-29.34q.67-16.46,6.9-27.77A52.21,52.21,0,0,1,1562,203.17a70,70,0,0,1,23.65-10.11,125.51,125.51,0,0,1,28.48-3.09,168.63,168.63,0,0,1,24,1.72,63.26,63.26,0,0,1,21.58,7,41.23,41.23,0,0,1,15.53,14.89q5.87,9.57,5.87,25v91q0,10.26,1.21,15.05t8.11,4.79a35.57,35.57,0,0,0,9-1.37Zm-47.64-90.87c-3.69,2.74-8.52,4.72-14.5,6s-12.26,2.27-18.82,3.07-13.17,1.71-19.85,2.73a73.7,73.7,0,0,0-17.95,4.94,32.62,32.62,0,0,0-12.94,9.73q-5,6.32-5,17.23a23.31,23.31,0,0,0,2.94,12.11,24.11,24.11,0,0,0,7.59,8,32,32,0,0,0,10.88,4.44,60.94,60.94,0,0,0,13.11,1.36q14.51,0,24.86-3.92a52.49,52.49,0,0,0,16.91-9.9,39.1,39.1,0,0,0,9.67-13,32.53,32.53,0,0,0,3.11-13.14Zm208.85,141.62q-20,21.6-62.83,21.6a122.11,122.11,0,0,1-25.37-2.74,78,78,0,0,1-23.48-8.92,54.41,54.41,0,0,1-17.43-16.11q-6.91-10-7.6-24.35h29.35a21.47,21.47,0,0,0,5,13.38,36.67,36.67,0,0,0,11.4,8.91,55.52,55.52,0,0,0,14.67,5,79.51,79.51,0,0,0,15.19,1.55q14.49,0,24.51-5A46,46,0,0,0,1840.59,401a56.53,56.53,0,0,0,9.49-21.09,117.46,117.46,0,0,0,2.94-27.09V341.19h-.7q-7.59,16.46-23,24.18a71.8,71.8,0,0,1-32.63,7.71q-20,0-34.86-7.2A72.88,72.88,0,0,1,1737,346.51a82.13,82.13,0,0,1-15-28.46,116.62,116.62,0,0,1-5-34.47,133.92,133.92,0,0,1,4.14-32.4A88.17,88.17,0,0,1,1735,221a75.49,75.49,0,0,1,25.55-22.29q15.87-8.75,39-8.75a66.21,66.21,0,0,1,31.07,7.38,52.13,52.13,0,0,1,22.09,22.11h.35V194.09h27.61V356.28Q1880.63,399.83,1860.61,421.43Zm-37.46-79.72a47.94,47.94,0,0,0,16.4-15.78,71.89,71.89,0,0,0,9.15-22.11,106.77,106.77,0,0,0,2.93-24.69,96.71,96.71,0,0,0-2.76-23,64,64,0,0,0-8.8-20.4,45.76,45.76,0,0,0-15.71-14.57q-9.66-5.49-23.47-5.49-14.16,0-24.17,5.32a46.77,46.77,0,0,0-16.4,14.23,60.14,60.14,0,0,0-9.32,20.57,99.69,99.69,0,0,0-2.93,24.35,120.63,120.63,0,0,0,2.42,24,67.5,67.5,0,0,0,8.28,21.77,46.37,46.37,0,0,0,15.54,15.78q9.66,6,24.16,6T1823.15,341.71Zm228,18.34q-20,15.09-50.41,15.09-21.4,0-37.11-6.86a73.16,73.16,0,0,1-26.41-19.2,81.52,81.52,0,0,1-16-29.49,141.12,141.12,0,0,1-6-37.38,106.1,106.1,0,0,1,6.21-37A88.56,88.56,0,0,1,1938.8,216a79.09,79.09,0,0,1,26.58-19.2A81.66,81.66,0,0,1,1999,190q23.82,0,39.53,9.78a78,78,0,0,1,25.2,24.86,98.18,98.18,0,0,1,13.12,32.91,140.6,140.6,0,0,1,2.93,34h-133.6a70,70,0,0,0,2.76,22.12,49.9,49.9,0,0,0,10,18.51A49.1,49.1,0,0,0,1976.6,345q10.7,4.82,25.2,4.8,18.65,0,30.55-8.57t15.71-26.06h29Q2071.18,345,2051.17,360.05Zm-7.08-113.84a50,50,0,0,0-10.7-16,53.1,53.1,0,0,0-56.62-10.63,47.48,47.48,0,0,0-15.71,10.81,51.69,51.69,0,0,0-10.35,15.94,60.18,60.18,0,0,0-4.49,19.37h102.53A59.47,59.47,0,0,0,2044.09,246.21ZM302.9,180a80.62,80.62,0,0,0,13.44-10.37c.8-.77,1.55-1.54,2.31-2.31a81.89,81.89,0,0,0,7.92-9.37,62.37,62.37,0,0,0,6.27-10.77,48.6,48.6,0,0,0,4.36-16.4c1.49-19.39-10-38.67-35.62-54.22L198.42,14,78.16,129.22l-78.29,75,108.6,65.9a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.8,66.42-25.69,19.16-18.36,25.52-42.12,13.7-61.87a49.69,49.69,0,0,0-6.8-8.87,89.78,89.78,0,0,0,19.28,2.15H259a85.09,85.09,0,0,0,31-5.79A80.88,80.88,0,0,0,302.9,180Zm-100.59,59.8c-19.32,18.51-50.4,21.24-75.7,5.9l-75.13-45.6,67.44-64.65,76.42,46.39C222.88,198.57,221.36,221.6,202.31,239.84Zm8.94-82.21L140.6,114.74,205,53l69.37,42.11c25.94,15.73,29.31,37.05,10.55,55A60.71,60.71,0,0,1,211.25,157.63Zm29.86,190c-19.57,18.75-46.17,29.08-74.88,29.08a123.84,123.84,0,0,1-64.11-18.19L-.13,296.51v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.85,87.85,0,0,1,241.11,347.67Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,257.52V282.2l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.68,12.88-12.35,20-27.13,19.68-41.5v-1.79A86.86,86.86,0,0,1,241.11,308.68Zm0-39c-19.57,18.76-46.17,29.09-74.88,29.09a123.84,123.84,0,0,1-64.11-18.19L-.13,218.54v24.68l108.6,65.91a111.59,111.59,0,0,0,57.76,16.41c24.92,0,48.8-8.8,66.42-25.69,12.88-12.34,20-27.12,19.68-41.49v-1.82A87.14,87.14,0,0,1,241.11,269.7Zm83.69,25.74a94.16,94.16,0,0,1-60.19,25.86h0V348a81.6,81.6,0,0,0,51.73-22.37c14-13.38,21.15-28.11,21-42.64v-2.2A95.14,95.14,0,0,1,324.8,295.44Zm-83.69,91.21c-19.57,18.75-46.17,29.09-74.88,29.09a123.76,123.76,0,0,1-64.11-18.2L-.13,335.49v24.67l108.6,65.91a111.6,111.6,0,0,0,57.76,16.42c24.92,0,48.8-8.81,66.42-25.69,12.88-12.34,20-27.13,19.68-41.49v-1.79A87.35,87.35,0,0,1,241.11,386.65Zm85.75-210.21c-.68.69-1.35,1.38-2.06,2.05a99.19,99.19,0,0,1-22.23,15.69,94.53,94.53,0,0,1-26.24,8.71,97.84,97.84,0,0,1-14.16,1.57c.5,1.61.9,3.25,1.25,4.9a52.7,52.7,0,0,1,1.13,12V231h.05A84.48,84.48,0,0,0,290,225.47a80.83,80.83,0,0,0,26.38-16.82c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,62.85,62.85,0,0,0,6.29-10.78,48.5,48.5,0,0,0,4.32-16.44c.09-1.23.2-2.47.19-3.7v-2c-.72,1-1.48,2.06-2.26,3.09A98,98,0,0,1,326.86,176.44Zm0,77.92c-.68.7-1.3,1.41-2,2.1a94.09,94.09,0,0,1-60.19,25.85h0V309h0a81.65,81.65,0,0,0,51.73-22.37,73.51,73.51,0,0,0,16.48-22.49,48.56,48.56,0,0,0,4.32-16.44c.09-1.24.2-2.48.19-3.71v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A95.81,95.81,0,0,1,326.82,254.36Zm0-39c-.68.7-1.3,1.41-2,2.1a92.22,92.22,0,0,1-10.62,8.65,93.53,93.53,0,0,1-11.63,7,95.63,95.63,0,0,1-37.94,10.18h-.05l0,26.67h0a81.63,81.63,0,0,0,51.73-22.37c.81-.77,1.51-1.56,2.27-2.34a82,82,0,0,0,7.92-9.38,63.16,63.16,0,0,0,6.29-10.77,48.55,48.55,0,0,0,4.32-16.45c.09-1.23.2-2.47.19-3.7v-2.2c-.74,1.08-1.47,2.16-2.27,3.22A98.19,98.19,0,0,1,326.82,215.38Z\"\n />\n </svg>\n );\n};\n\nexport default LogoFull;\n","/*\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 from 'react';\nimport {\n createExtension,\n coreExtensionData,\n createExtensionInput,\n useRouteRef,\n NavTarget,\n} from '@backstage/frontend-plugin-api';\nimport { makeStyles } from '@material-ui/core';\nimport {\n Sidebar,\n useSidebarOpenState,\n Link,\n sidebarConfig,\n SidebarDivider,\n SidebarItem,\n} from '@backstage/core-components';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport LogoIcon from '../../../app/src/components/Root/LogoIcon';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport LogoFull from '../../../app/src/components/Root/LogoFull';\n\nconst useSidebarLogoStyles = makeStyles({\n root: {\n width: sidebarConfig.drawerWidthClosed,\n height: 3 * sidebarConfig.logoHeight,\n display: 'flex',\n flexFlow: 'row nowrap',\n alignItems: 'center',\n marginBottom: -14,\n },\n link: {\n width: sidebarConfig.drawerWidthClosed,\n marginLeft: 24,\n },\n});\n\nconst SidebarLogo = () => {\n const classes = useSidebarLogoStyles();\n const { isOpen } = useSidebarOpenState();\n\n return (\n <div className={classes.root}>\n <Link to=\"/\" underline=\"none\" className={classes.link} aria-label=\"Home\">\n {isOpen ? <LogoFull /> : <LogoIcon />}\n </Link>\n </div>\n );\n};\n\nconst SidebarNavItem = (props: NavTarget) => {\n const { icon: Icon, title, routeRef } = props;\n const to = useRouteRef(routeRef)();\n // TODO: Support opening modal, for example, the search one\n return <SidebarItem to={to} icon={Icon} text={title} />;\n};\n\nexport const CoreNav = createExtension({\n id: 'core.nav',\n at: 'core.layout/nav',\n inputs: {\n items: createExtensionInput({\n target: coreExtensionData.navTarget,\n }),\n },\n output: {\n element: coreExtensionData.reactElement,\n },\n factory({ bind, inputs }) {\n bind({\n element: (\n <Sidebar>\n <SidebarLogo />\n <SidebarDivider />\n {inputs.items.map((item, index) => (\n <SidebarNavItem {...item.target} key={index} />\n ))}\n </Sidebar>\n ),\n });\n },\n});\n","/*\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 {\n AnyExtensionDataMap,\n AnyExtensionInputMap,\n BackstagePlugin,\n Extension,\n ExtensionDataRef,\n} from '@backstage/frontend-plugin-api';\nimport mapValues from 'lodash/mapValues';\n\n/** @internal */\nexport interface ExtensionInstance {\n readonly $$type: '@backstage/ExtensionInstance';\n\n readonly id: string;\n /**\n * Get concrete value for the given extension data reference. Returns undefined if no value is available.\n */\n getData<T>(ref: ExtensionDataRef<T>): T | undefined;\n /**\n * Maps input names to the actual instances given to them.\n */\n readonly attachments: Map<string, ExtensionInstance[]>;\n}\n\nfunction resolveInputData(\n dataMap: AnyExtensionDataMap,\n attachment: ExtensionInstance,\n inputName: string,\n) {\n return mapValues(dataMap, ref => {\n const value = attachment.getData(ref);\n if (value === undefined && !ref.config.optional) {\n throw new Error(\n `input '${inputName}' did not receive required extension data '${ref.id}' from extension '${attachment.id}'`,\n );\n }\n return value;\n });\n}\n\nfunction resolveInputs(\n inputMap: AnyExtensionInputMap,\n attachments: Map<string, ExtensionInstance[]>,\n) {\n return mapValues(inputMap, (input, inputName) => {\n const attachedInstances = attachments.get(inputName) ?? [];\n if (input.config.singleton) {\n if (attachedInstances.length > 1) {\n throw Error(\n `expected ${\n input.config.optional ? 'at most' : 'exactly'\n } one '${inputName}' input but received multiple: '${attachedInstances\n .map(e => e.id)\n .join(\"', '\")}'`,\n );\n } else if (attachedInstances.length === 0) {\n if (input.config.optional) {\n return undefined;\n }\n throw Error(`input '${inputName}' is required but was not received`);\n }\n return resolveInputData(\n input.extensionData,\n attachedInstances[0],\n inputName,\n );\n }\n\n return attachedInstances.map(attachment =>\n resolveInputData(input.extensionData, attachment, inputName),\n );\n });\n}\n\n/** @internal */\nexport function createExtensionInstance(options: {\n extension: Extension<unknown>;\n config: unknown;\n source?: BackstagePlugin;\n attachments: Map<string, ExtensionInstance[]>;\n}): ExtensionInstance {\n const { extension, config, source, attachments } = options;\n const extensionData = new Map<string, unknown>();\n\n let parsedConfig: unknown;\n try {\n parsedConfig = extension.configSchema?.parse(config ?? {});\n } catch (e) {\n throw new Error(\n `Invalid configuration for extension '${extension.id}'; caused by ${e}`,\n );\n }\n\n try {\n extension.factory({\n source,\n config: parsedConfig,\n bind: namedOutputs => {\n for (const [name, output] of Object.entries(namedOutputs)) {\n const ref = extension.output[name];\n if (!ref) {\n throw new Error(`unknown output provided via '${name}'`);\n }\n if (extensionData.has(ref.id)) {\n throw new Error(\n `duplicate extension data '${ref.id}' received via output '${name}'`,\n );\n }\n extensionData.set(ref.id, output);\n }\n },\n inputs: resolveInputs(extension.inputs, attachments),\n });\n } catch (e) {\n throw new Error(\n `Failed to instantiate extension '${extension.id}'${\n e.name === 'Error' ? `, ${e.message}` : `; caused by ${e}`\n }`,\n );\n }\n\n return {\n $$type: '@backstage/ExtensionInstance',\n id: options.extension.id,\n getData<T>(ref: ExtensionDataRef<T>): T | undefined {\n return extensionData.get(ref.id) as T | undefined;\n },\n\n attachments,\n };\n}\n","/*\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 { Config } from '@backstage/config';\nimport { BackstagePlugin, Extension } from '@backstage/frontend-plugin-api';\nimport { JsonValue } from '@backstage/types';\n\nexport interface ExtensionParameters {\n id: string;\n at?: string;\n disabled?: boolean;\n config?: unknown;\n}\n\nconst knownExtensionParameters = ['at', 'disabled', 'config'];\n\n// Since we'll never merge arrays in config the config reader context\n// isn't too much of a help. Fall back to manual config reading logic\n// as the Config interface makes it quite hard for us otherwise.\n/** @internal */\nexport function readAppExtensionParameters(\n rootConfig: Config,\n): ExtensionParameters[] {\n const arr = rootConfig.getOptional('app.extensions');\n if (!Array.isArray(arr)) {\n if (arr === undefined) {\n return [];\n }\n // This will throw, and show which part of config had the wrong type\n rootConfig.getConfigArray('app.extensions');\n return [];\n }\n\n return arr.map((arrayEntry, arrayIndex) =>\n expandShorthandExtensionParameters(arrayEntry, arrayIndex),\n );\n}\n\n/** @internal */\nexport function expandShorthandExtensionParameters(\n arrayEntry: JsonValue,\n arrayIndex: number,\n): ExtensionParameters {\n function errorMsg(msg: string, key?: string, prop?: string) {\n return `Invalid extension configuration at app.extensions[${arrayIndex}]${\n key ? `[${key}]` : ''\n }${prop ? `.${prop}` : ''}, ${msg}`;\n }\n\n // NOTE(freben): This check is intentionally not complete and doesn't check\n // whether letters and digits are used, etc. It's not up to the config reading\n // logic to decide what constitutes a valid extension ID; that should be\n // decided by the logic that loads and instantiates the extensions. This check\n // is just here to catch real mistakes or truly conceptually wrong input.\n function assertValidId(id: string) {\n if (!id || id !== id.trim()) {\n throw new Error(\n errorMsg('extension ID must not be empty or contain whitespace'),\n );\n }\n\n if (id.includes('/')) {\n let message = `extension ID must not contain slashes; got '${id}'`;\n const good = id.split('/')[0];\n if (good) {\n message += `, did you mean '${good}'?`;\n }\n throw new Error(errorMsg(message));\n }\n }\n\n // Example YAML:\n // - entity.card.about\n if (typeof arrayEntry === 'string') {\n assertValidId(arrayEntry);\n return {\n id: arrayEntry,\n disabled: false,\n };\n }\n\n // All remaining cases are single-key objects\n if (\n typeof arrayEntry !== 'object' ||\n arrayEntry === null ||\n Array.isArray(arrayEntry)\n ) {\n throw new Error(errorMsg('must be a string or an object'));\n }\n const keys = Object.keys(arrayEntry);\n if (keys.length !== 1) {\n const joinedKeys = keys.length ? `'${keys.join(\"', '\")}'` : 'none';\n throw new Error(errorMsg(`must have exactly one key, got ${joinedKeys}`));\n }\n\n const id = String(keys[0]);\n const value = arrayEntry[id];\n assertValidId(id);\n\n // This example covers a potentially common mistake in the syntax\n // Example YAML:\n // - entity.card.about:\n if (value === null) {\n return {\n id,\n disabled: false,\n };\n }\n\n // Example YAML:\n // - catalog.page.cicd: false\n if (typeof value === 'boolean') {\n return {\n id,\n disabled: !value,\n };\n }\n\n // The remaining case is the generic object. Example YAML:\n // - tech-radar.page:\n // at: core.router/routes\n // disabled: false\n // config:\n // path: /tech-radar\n // width: 1500\n // height: 800\n if (typeof value !== 'object' || Array.isArray(value)) {\n // We don't mention null here - we don't want people to explicitly enter\n // - entity.card.about: null\n throw new Error(errorMsg('value must be a boolean or object', id));\n }\n\n const at = value.at;\n const disabled = value.disabled;\n const config = value.config;\n\n if (at !== undefined && typeof at !== 'string') {\n throw new Error(errorMsg('must be a string', id, 'at'));\n } else if (disabled !== undefined && typeof disabled !== 'boolean') {\n throw new Error(errorMsg('must be a boolean', id, 'disabled'));\n } else if (\n config !== undefined &&\n (typeof config !== 'object' || config === null || Array.isArray(config))\n ) {\n throw new Error(errorMsg('must be an object', id, 'config'));\n }\n\n const unknownKeys = Object.keys(value).filter(\n k => !knownExtensionParameters.includes(k),\n );\n if (unknownKeys.length > 0) {\n throw new Error(\n errorMsg(\n `unknown parameter; expected one of '${knownExtensionParameters.join(\n \"', '\",\n )}'`,\n id,\n unknownKeys.join(', '),\n ),\n );\n }\n\n return {\n id,\n at,\n disabled,\n config,\n };\n}\n\nexport interface ExtensionInstanceParameters {\n extension: Extension<unknown>;\n source?: BackstagePlugin;\n at: string;\n config?: unknown;\n}\n\n/** @internal */\nexport function mergeExtensionParameters(options: {\n sources: BackstagePlugin[];\n builtinExtensions: Extension<unknown>[];\n parameters: Array<ExtensionParameters>;\n}): ExtensionInstanceParameters[] {\n const { sources, builtinExtensions, parameters } = options;\n\n const pluginExtensions = sources.flatMap(source => {\n return source.extensions.map(extension => ({ ...extension, source }));\n });\n\n // Prevent root override\n if (pluginExtensions.some(({ id }) => id === 'root')) {\n const rootPluginIds = pluginExtensions\n .filter(({ id }) => id === 'root')\n .map(({ source }) => source.id);\n throw new Error(\n `The following plugin(s) are overriding the 'root' extension which is forbidden: ${rootPluginIds.join(\n ',',\n )}`,\n );\n }\n\n const overrides = [\n ...pluginExtensions.map(({ source, ...extension }) => ({\n extension,\n params: {\n source,\n at: extension.at,\n disabled: extension.disabled,\n config: undefined as unknown,\n },\n })),\n ...builtinExtensions.map(extension => ({\n extension,\n params: {\n source: undefined,\n at: extension.at,\n disabled: extension.disabled,\n config: undefined as unknown,\n },\n })),\n ];\n\n const duplicatedExtensionIds = new Set<string>();\n const duplicatedExtensionData = overrides.reduce<\n Record<string, Record<string, number>>\n >((data, { extension, params }) => {\n const extensionId = extension.id;\n const extensionData = data?.[extensionId];\n if (extensionData) duplicatedExtensionIds.add(extensionId);\n const pluginId = params.source?.id ?? 'internal';\n const pluginCount = extensionData?.[pluginId] ?? 0;\n return {\n ...data,\n [extensionId]: { ...extensionData, [pluginId]: pluginCount + 1 },\n };\n }, {});\n\n if (duplicatedExtensionIds.size > 0) {\n throw new Error(\n `The following extensions are duplicated: ${Array.from(\n duplicatedExtensionIds,\n )\n .map(\n extensionId =>\n `The extension '${extensionId}' was provided ${Object.keys(\n duplicatedExtensionData[extensionId],\n )\n .map(\n pluginId =>\n `${duplicatedExtensionData[extensionId][pluginId]} time(s) by the plugin '${pluginId}'`,\n )\n .join(' and ')}`,\n )\n .join(', ')}`,\n );\n }\n\n for (const overrideParam of parameters) {\n const extensionId = overrideParam.id;\n\n // Prevent root parametrization\n if (extensionId === 'root') {\n throw new Error(\n \"A 'root' extension configuration was detected, but the root extension is not configurable\",\n );\n }\n\n const existingIndex = overrides.findIndex(\n e => e.extension.id === extensionId,\n );\n if (existingIndex !== -1) {\n const existing = overrides[existingIndex];\n if (overrideParam.at) {\n existing.params.at = overrideParam.at;\n }\n if (overrideParam.config) {\n // TODO: merge config?\n existing.params.config = overrideParam.config;\n }\n if (\n Boolean(existing.params.disabled) !== Boolean(overrideParam.disabled)\n ) {\n existing.params.disabled = Boolean(overrideParam.disabled);\n if (!existing.params.disabled) {\n // bump\n overrides.splice(existingIndex, 1);\n overrides.push(existing);\n }\n }\n } else {\n throw new Error(`Extension ${extensionId} does not exist`);\n }\n }\n\n return overrides\n .filter(override => !override.params.disabled)\n .map(param => ({\n extension: param.extension,\n at: param.params.at,\n source: param.params.source,\n config: param.params.config,\n }));\n}\n","/*\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 { RouteRef } from '@backstage/core-plugin-api';\nimport React, { createContext, ReactNode } from 'react';\n\nexport interface RoutingContextType {\n resolve(\n routeRef: RouteRef,\n options: { pathname: string },\n ): (() => string) | undefined;\n}\n\nexport const RoutingContext = createContext<RoutingContextType>({\n resolve: () => () => '',\n});\n\nexport class RouteResolver {\n constructor(private readonly routePaths: Map<RouteRef, string>) {}\n\n resolve(anyRouteRef: RouteRef<{}>): (() => string) | undefined {\n const basePath = this.routePaths.get(anyRouteRef);\n if (!basePath) {\n return undefined;\n }\n return () => basePath;\n }\n}\n\nexport function RoutingProvider(props: {\n routePaths: Map<RouteRef, string>;\n children?: ReactNode;\n}) {\n return (\n <RoutingContext.Provider value={new RouteResolver(props.routePaths)}>\n {props.children}\n </RoutingContext.Provider>\n );\n}\n","/*\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 { BackstagePlugin } from '@backstage/frontend-plugin-api';\n\ninterface DiscoveryGlobal {\n modules: Array<{ name: string; default: unknown }>;\n}\n\n/**\n * @public\n */\nexport function getAvailablePlugins(): BackstagePlugin[] {\n const discovered = (\n window as { '__@backstage/discovered__'?: DiscoveryGlobal }\n )['__@backstage/discovered__'];\n\n return (\n discovered?.modules.map(m => m.default).filter(isBackstagePlugin) ?? []\n );\n}\n\nfunction isBackstagePlugin(obj: unknown): obj is BackstagePlugin {\n if (obj !== null && typeof obj === 'object' && '$$type' in obj) {\n return obj.$$type === '@backstage/BackstagePlugin';\n }\n return false;\n}\n","/*\n * Copyright 2020 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, { useMemo, useEffect, useState, PropsWithChildren } from 'react';\nimport { useApi, appThemeApiRef, AppTheme } from '@backstage/core-plugin-api';\nimport useObservable from 'react-use/lib/useObservable';\n\n// This tries to find the most accurate match, but also falls back to less\n// accurate results in order to avoid errors.\nfunction resolveTheme(\n themeId: string | undefined,\n shouldPreferDark: boolean,\n themes: AppTheme[],\n) {\n if (themeId !== undefined) {\n const selectedTheme = themes.find(theme => theme.id === themeId);\n if (selectedTheme) {\n return selectedTheme;\n }\n }\n\n if (shouldPreferDark) {\n const darkTheme = themes.find(theme => theme.variant === 'dark');\n if (darkTheme) {\n return darkTheme;\n }\n }\n\n const lightTheme = themes.find(theme => theme.variant === 'light');\n if (lightTheme) {\n return lightTheme;\n }\n\n return themes[0];\n}\n\nconst useShouldPreferDarkTheme = () => {\n const mediaQuery = useMemo(\n () => window.matchMedia('(prefers-color-scheme: dark)'),\n [],\n );\n const [shouldPreferDark, setPrefersDark] = useState(mediaQuery.matches);\n\n useEffect(() => {\n const listener = (event: MediaQueryListEvent) => {\n setPrefersDark(event.matches);\n };\n mediaQuery.addListener(listener);\n return () => {\n mediaQuery.removeListener(listener);\n };\n }, [mediaQuery]);\n\n return shouldPreferDark;\n};\n\nexport function AppThemeProvider({ children }: PropsWithChildren<{}>) {\n const appThemeApi = useApi(appThemeApiRef);\n const themeId = useObservable(\n appThemeApi.activeThemeId$(),\n appThemeApi.getActiveThemeId(),\n );\n\n // Browser feature detection won't change over time, so ignore lint rule\n const shouldPreferDark = Boolean(window.matchMedia)\n ? useShouldPreferDarkTheme() // eslint-disable-line react-hooks/rules-of-hooks\n : false;\n\n const appTheme = resolveTheme(\n themeId,\n shouldPreferDark,\n appThemeApi.getInstalledThemes(),\n );\n if (!appTheme) {\n throw new Error('App has no themes');\n }\n\n return <appTheme.Provider children={children} />;\n}\n","/*\n * Copyright 2020 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 {\n IdentityApi,\n ProfileInfo,\n BackstageUserIdentity,\n} from '@backstage/core-plugin-api';\n\nfunction mkError(thing: string) {\n return new Error(\n `Tried to access IdentityApi ${thing} before app was loaded`,\n );\n}\n\nfunction logDeprecation(thing: string) {\n // eslint-disable-next-line no-console\n console.warn(\n `WARNING: Call to ${thing} is deprecated and will break in the future`,\n );\n}\n\n// We use this for a period of backwards compatibility. It is a hidden\n// compatibility that will allow old plugins to continue working for a limited time.\ntype CompatibilityIdentityApi = IdentityApi & {\n getUserId?(): string;\n getIdToken?(): Promise<string | undefined>;\n getProfile?(): ProfileInfo;\n};\n\n/**\n * Implementation of the connection between the App-wide IdentityApi\n * and sign-in page.\n */\nexport class AppIdentityProxy implements IdentityApi {\n private target?: CompatibilityIdentityApi;\n private waitForTarget: Promise<CompatibilityIdentityApi>;\n private resolveTarget: (api: CompatibilityIdentityApi) => void = () => {};\n private signOutTargetUrl = '/';\n\n constructor() {\n this.waitForTarget = new Promise<CompatibilityIdentityApi>(resolve => {\n this.resolveTarget = resolve;\n });\n }\n\n // This is called by the app manager once the sign-in page provides us with an implementation\n setTarget(\n identityApi: CompatibilityIdentityApi,\n targetOptions: { signOutTargetUrl: string },\n ) {\n this.target = identityApi;\n this.signOutTargetUrl = targetOptions.signOutTargetUrl;\n this.resolveTarget(identityApi);\n }\n\n getUserId(): string {\n if (!this.target) {\n throw mkError('getUserId');\n }\n if (!this.target.getUserId) {\n throw new Error('IdentityApi does not implement getUserId');\n }\n logDeprecation('getUserId');\n return this.target.getUserId();\n }\n\n getProfile(): ProfileInfo {\n if (!this.target) {\n throw mkError('getProfile');\n }\n if (!this.target.getProfile) {\n throw new Error('IdentityApi does not implement getProfile');\n }\n logDeprecation('getProfile');\n return this.target.getProfile();\n }\n\n async getProfileInfo(): Promise<ProfileInfo> {\n return this.waitForTarget.then(target => target.getProfileInfo());\n }\n\n async getBackstageIdentity(): Promise<BackstageUserIdentity> {\n const identity = await this.waitForTarget.then(target =>\n target.getBackstageIdentity(),\n );\n if (!identity.userEntityRef.match(/^.*:.*\\/.*$/)) {\n // eslint-disable-next-line no-console\n console.warn(\n `WARNING: The App IdentityApi provided an invalid userEntityRef, '${identity.userEntityRef}'. ` +\n `It must be a full Entity Reference of the form '<kind>:<namespace>/<name>'.`,\n );\n }\n\n return identity;\n }\n\n async getCredentials(): Promise<{ token?: string | undefined }> {\n return this.waitForTarget.then(target => target.getCredentials());\n }\n\n async getIdToken(): Promise<string | undefined> {\n return this.waitForTarget.then(target => {\n if (!target.getIdToken) {\n throw new Error('IdentityApi does not implement getIdToken');\n }\n logDeprecation('getIdToken');\n return target.getIdToken();\n });\n }\n\n async signOut(): Promise<void> {\n await this.waitForTarget.then(target => target.signOut());\n window.location.href = this.signOutTargetUrl;\n }\n}\n","/*\n * Copyright 2020 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, { PropsWithChildren } from 'react';\nimport {\n createVersionedValueMap,\n createVersionedContext,\n} from '@backstage/version-bridge';\nimport { AppContext as AppContextV1 } from './types';\n\nconst AppContext = createVersionedContext<{ 1: AppContextV1 }>('app-context');\n\ntype Props = {\n appContext: AppContextV1;\n};\n\nexport const AppContextProvider = ({\n appContext,\n children,\n}: PropsWithChildren<Props>) => {\n const versionedValue = createVersionedValueMap({ 1: appContext });\n\n return <AppContext.Provider value={versionedValue} children={children} />;\n};\n","/*\n * Copyright 2020 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 {\n FeatureFlagState,\n FeatureFlagsApi,\n FeatureFlag,\n FeatureFlagsSaveOptions,\n} from '@backstage/core-plugin-api';\n\nexport function validateFlagName(name: string): void {\n if (name.length < 3) {\n throw new Error(\n `The '${name}' feature flag must have a minimum length of three characters.`,\n );\n }\n\n if (name.length > 150) {\n throw new Error(\n `The '${name}' feature flag must not exceed 150 characters.`,\n );\n }\n\n if (!name.match(/^[a-z]+[a-z0-9-]+$/)) {\n throw new Error(\n `The '${name}' feature flag must start with a lowercase letter and only contain lowercase letters, numbers and hyphens. ` +\n 'Examples: feature-flag-one, alpha, release-2020',\n );\n }\n}\n\n/**\n * A feature flags implementation that stores the flags in the browser's local\n * storage.\n *\n * @public\n */\nexport class LocalStorageFeatureFlags implements FeatureFlagsApi {\n private registeredFeatureFlags: FeatureFlag[] = [];\n private flags?: Map<string, FeatureFlagState>;\n\n registerFlag(flag: FeatureFlag) {\n validateFlagName(flag.name);\n this.registeredFeatureFlags.push(flag);\n }\n\n getRegisteredFlags(): FeatureFlag[] {\n return this.registeredFeatureFlags.slice();\n }\n\n isActive(name: string): boolean {\n if (!this.flags) {\n this.flags = this.load();\n }\n return this.flags.get(name) === FeatureFlagState.Active;\n }\n\n save(options: FeatureFlagsSaveOptions): void {\n if (!this.flags) {\n this.flags = this.load();\n }\n if (!options.merge) {\n this.flags.clear();\n }\n for (const [name, state] of Object.entries(options.states)) {\n this.flags.set(name, state);\n }\n\n const enabled = Array.from(this.flags.entries()).filter(\n ([, state]) => state === FeatureFlagState.Active,\n );\n window.localStorage.setItem(\n 'featureFlags',\n JSON.stringify(Object.fromEntries(enabled)),\n );\n }\n\n private load(): Map<string, FeatureFlagState> {\n try {\n const jsonStr = window.localStorage.getItem('featureFlags');\n if (!jsonStr) {\n return new Map();\n }\n const json = JSON.parse(jsonStr) as unknown;\n if (typeof json !== 'object' || json === null || Array.isArray(json)) {\n return new Map();\n }\n\n const entries = Object.entries(json).filter(([name, value]) => {\n validateFlagName(name);\n return value === FeatureFlagState.Active;\n });\n\n return new Map(entries);\n } catch {\n return new Map();\n }\n }\n}\n","/*\n * Copyright 2020 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 { AppConfig } from '@backstage/config';\nimport { JsonObject } from '@backstage/types';\nimport { AppConfigLoader } from './types';\n\n/**\n * The default config loader, which expects that config is available at compile-time\n * in `process.env.APP_CONFIG`. APP_CONFIG should be an array of config objects as\n * returned by the config loader.\n *\n * It will also load runtime config from the __APP_INJECTED_RUNTIME_CONFIG__ string,\n * which can be rewritten at runtime to contain an additional JSON config object.\n * If runtime config is present, it will be placed first in the config array, overriding\n * other config values.\n *\n * @public\n */\nexport const defaultConfigLoader: AppConfigLoader = async () =>\n defaultConfigLoaderSync();\n\n/** @internal */\nexport function defaultConfigLoaderSync(\n // This string may be replaced at runtime to provide additional config.\n // It should be replaced by a JSON-serialized config object.\n // It's a param so we can test it, but at runtime this will always fall back to default.\n runtimeConfigJson: string = '__APP_INJECTED_RUNTIME_CONFIG__',\n) {\n const appConfig = process.env.APP_CONFIG;\n if (!appConfig) {\n throw new Error('No static configuration provided');\n }\n if (!Array.isArray(appConfig)) {\n throw new Error('Static configuration has invalid format');\n }\n const configs = appConfig.slice() as unknown as AppConfig[];\n\n // Avoiding this string also being replaced at runtime\n if (\n runtimeConfigJson !==\n '__app_injected_runtime_config__'.toLocaleUpperCase('en-US')\n ) {\n try {\n const data = JSON.parse(runtimeConfigJson) as JsonObject;\n if (Array.isArray(data)) {\n configs.push(...data);\n } else {\n configs.push({ data, context: 'env' });\n }\n } catch (error) {\n throw new Error(`Failed to load runtime configuration, ${error}`);\n }\n }\n\n const windowAppConfig = (window as any).__APP_CONFIG__;\n if (windowAppConfig) {\n configs.push({\n context: 'window',\n data: windowAppConfig,\n });\n }\n return configs;\n}\n","/*\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 { AppConfig, ConfigReader } from '@backstage/config';\n\n/**\n * Creates a base URL that uses to the current document origin.\n */\nfunction createLocalBaseUrl(fullUrl: string): string {\n const url = new URL(fullUrl);\n url.protocol = document.location.protocol;\n url.hostname = document.location.hostname;\n url.port = document.location.port;\n return url.toString().replace(/\\/$/, '');\n}\n\n/**\n * If we are able to override the app and backend base URLs to values that\n * match the origin of the current location, then this function returns a\n * new array of app configs that contain the overrides.\n *\n * @internal\n */\nexport function overrideBaseUrlConfigs(inputConfigs: AppConfig[]): AppConfig[] {\n const urlConfigReader = ConfigReader.fromConfigs(inputConfigs);\n\n // In tests we may not have `app.baseUrl` or `backend.baseUrl`, to keep them optional\n const appBaseUrl = urlConfigReader.getOptionalString('app.baseUrl');\n const backendBaseUrl = urlConfigReader.getOptionalString('backend.baseUrl');\n\n let configs = inputConfigs;\n\n let newBackendBaseUrl: string | undefined = undefined;\n let newAppBaseUrl: string | undefined = undefined;\n\n if (appBaseUrl && backendBaseUrl) {\n const appOrigin = new URL(appBaseUrl).origin;\n const backendOrigin = new URL(backendBaseUrl).origin;\n\n if (appOrigin === backendOrigin) {\n const maybeNewBackendBaseUrl = createLocalBaseUrl(backendBaseUrl);\n if (backendBaseUrl !== maybeNewBackendBaseUrl) {\n newBackendBaseUrl = maybeNewBackendBaseUrl;\n }\n }\n }\n\n if (appBaseUrl) {\n const maybeNewAppBaseUrl = createLocalBaseUrl(appBaseUrl);\n if (appBaseUrl !== maybeNewAppBaseUrl) {\n newAppBaseUrl = maybeNewAppBaseUrl;\n }\n }\n\n // Only add the relative config if there is actually data to add.\n if (newAppBaseUrl || newBackendBaseUrl) {\n configs = configs.concat({\n data: {\n app: newAppBaseUrl && {\n baseUrl: newAppBaseUrl,\n },\n backend: newBackendBaseUrl && {\n baseUrl: newBackendBaseUrl,\n },\n },\n context: 'relative-resolver',\n });\n }\n\n return configs;\n}\n","/*\n * Copyright 2020 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 {\n AlertApiForwarder,\n NoOpAnalyticsApi,\n ErrorApiForwarder,\n ErrorAlerter,\n GoogleAuth,\n GithubAuth,\n OktaAuth,\n GitlabAuth,\n MicrosoftAuth,\n BitbucketAuth,\n BitbucketServerAuth,\n OAuthRequestManager,\n WebStorage,\n UrlPatternDiscovery,\n OneLoginAuth,\n UnhandledErrorForwarder,\n AtlassianAuth,\n createFetchApi,\n FetchMiddlewares,\n} from '@backstage/core-app-api';\n\nimport {\n createApiFactory,\n alertApiRef,\n analyticsApiRef,\n errorApiRef,\n discoveryApiRef,\n fetchApiRef,\n identityApiRef,\n oauthRequestApiRef,\n googleAuthApiRef,\n githubAuthApiRef,\n oktaAuthApiRef,\n gitlabAuthApiRef,\n microsoftAuthApiRef,\n storageApiRef,\n configApiRef,\n oneloginAuthApiRef,\n bitbucketAuthApiRef,\n bitbucketServerAuthApiRef,\n atlassianAuthApiRef,\n} from '@backstage/core-plugin-api';\nimport {\n permissionApiRef,\n IdentityPermissionApi,\n} from '@backstage/plugin-permission-react';\n\nexport const apis = [\n createApiFactory({\n api: discoveryApiRef,\n deps: { configApi: configApiRef },\n factory: ({ configApi }) =>\n UrlPatternDiscovery.compile(\n `${configApi.getString('backend.baseUrl')}/api/{{ pluginId }}`,\n ),\n }),\n createApiFactory({\n api: alertApiRef,\n deps: {},\n factory: () => new AlertApiForwarder(),\n }),\n createApiFactory({\n api: analyticsApiRef,\n deps: {},\n factory: () => new NoOpAnalyticsApi(),\n }),\n createApiFactory({\n api: errorApiRef,\n deps: { alertApi: alertApiRef },\n factory: ({ alertApi }) => {\n const errorApi = new ErrorAlerter(alertApi, new ErrorApiForwarder());\n UnhandledErrorForwarder.forward(errorApi, { hidden: false });\n return errorApi;\n },\n }),\n createApiFactory({\n api: storageApiRef,\n deps: { errorApi: errorApiRef },\n factory: ({ errorApi }) => WebStorage.create({ errorApi }),\n }),\n createApiFactory({\n api: fetchApiRef,\n deps: {\n configApi: configApiRef,\n identityApi: identityApiRef,\n discoveryApi: discoveryApiRef,\n },\n factory: ({ configApi, identityApi, discoveryApi }) => {\n return createFetchApi({\n middleware: [\n FetchMiddlewares.resolvePluginProtocol({\n discoveryApi,\n }),\n FetchMiddlewares.injectIdentityAuth({\n identityApi,\n config: configApi,\n }),\n ],\n });\n },\n }),\n createApiFactory({\n api: oauthRequestApiRef,\n deps: {},\n factory: () => new OAuthRequestManager(),\n }),\n createApiFactory({\n api: googleAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n GoogleAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n createApiFactory({\n api: microsoftAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n MicrosoftAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n createApiFactory({\n api: githubAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n GithubAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n defaultScopes: ['read:user'],\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n createApiFactory({\n api: oktaAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n OktaAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n createApiFactory({\n api: gitlabAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n GitlabAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n createApiFactory({\n api: oneloginAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n OneLoginAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n createApiFactory({\n api: bitbucketAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n BitbucketAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n defaultScopes: ['team'],\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n createApiFactory({\n api: bitbucketServerAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n BitbucketServerAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n defaultScopes: ['REPO_READ'],\n }),\n }),\n createApiFactory({\n api: atlassianAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) => {\n return AtlassianAuth.create({\n configApi,\n discoveryApi,\n oauthRequestApi,\n environment: configApi.getOptionalString('auth.environment'),\n });\n },\n }),\n createApiFactory({\n api: permissionApiRef,\n deps: {\n discovery: discoveryApiRef,\n identity: identityApiRef,\n config: configApiRef,\n },\n factory: ({ config, discovery, identity }) =>\n IdentityPermissionApi.create({ config, discovery, identity }),\n }),\n];\n","/*\n * Copyright 2021 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, { ReactNode } from 'react';\nimport Button from '@material-ui/core/Button';\nimport { ErrorPanel, Progress, ErrorPage } from '@backstage/core-components';\nimport {\n MemoryRouter,\n useInRouterContext,\n BrowserRouter,\n} from 'react-router-dom';\nimport {\n AppComponents,\n BootErrorPageProps,\n ErrorBoundaryFallbackProps,\n} from '@backstage/core-plugin-api';\n\nexport function OptionallyWrapInRouter({ children }: { children: ReactNode }) {\n if (useInRouterContext()) {\n return <>{children}</>;\n }\n return <MemoryRouter>{children}</MemoryRouter>;\n}\n\nconst DefaultNotFoundPage = () => (\n <ErrorPage status=\"404\" statusMessage=\"PAGE NOT FOUND\" />\n);\n\nconst DefaultBootErrorPage = ({ step, error }: BootErrorPageProps) => {\n let message = '';\n if (step === 'load-config') {\n message = `The configuration failed to load, someone should have a look at this error: ${error.message}`;\n } else if (step === 'load-chunk') {\n message = `Lazy loaded chunk failed to load, try to reload the page: ${error.message}`;\n }\n // TODO: figure out a nicer way to handle routing on the error page, when it can be done.\n return (\n <OptionallyWrapInRouter>\n <ErrorPage status=\"501\" statusMessage={message} />\n </OptionallyWrapInRouter>\n );\n};\n\nconst DefaultErrorBoundaryFallback = ({\n error,\n resetError,\n plugin,\n}: ErrorBoundaryFallbackProps) => {\n return (\n <ErrorPanel\n title={`Error in ${plugin?.getId()}`}\n defaultExpanded\n error={error}\n >\n <Button variant=\"outlined\" onClick={resetError}>\n Retry\n </Button>\n </ErrorPanel>\n );\n};\n\n/**\n * Creates a set of default components to pass along to {@link @backstage/core-app-api#createSpecializedApp}.\n *\n * @public\n */\nexport const components: AppComponents = {\n Progress,\n Router: BrowserRouter,\n NotFoundErrorPage: DefaultNotFoundPage,\n BootErrorPage: DefaultBootErrorPage,\n ErrorBoundaryFallback: DefaultErrorBoundaryFallback,\n};\n","/*\n * Copyright 2020 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 { IconComponent } from '@backstage/core-plugin-api';\nimport MuiApartmentIcon from '@material-ui/icons/Apartment';\nimport MuiBrokenImageIcon from '@material-ui/icons/BrokenImage';\nimport MuiCategoryIcon from '@material-ui/icons/Category';\nimport MuiCreateNewFolderIcon from '@material-ui/icons/CreateNewFolder';\nimport MuiSubjectIcon from '@material-ui/icons/Subject';\nimport MuiSearchIcon from '@material-ui/icons/Search';\nimport MuiChatIcon from '@material-ui/icons/Chat';\nimport MuiDashboardIcon from '@material-ui/icons/Dashboard';\nimport MuiDocsIcon from '@material-ui/icons/Description';\nimport MuiEmailIcon from '@material-ui/icons/Email';\nimport MuiExtensionIcon from '@material-ui/icons/Extension';\nimport MuiGitHubIcon from '@material-ui/icons/GitHub';\nimport MuiHelpIcon from '@material-ui/icons/Help';\nimport MuiLocationOnIcon from '@material-ui/icons/LocationOn';\nimport MuiMemoryIcon from '@material-ui/icons/Memory';\nimport MuiMenuBookIcon from '@material-ui/icons/MenuBook';\nimport MuiPeopleIcon from '@material-ui/icons/People';\nimport MuiPersonIcon from '@material-ui/icons/Person';\nimport MuiWarningIcon from '@material-ui/icons/Warning';\nimport MuiWorkIcon from '@material-ui/icons/Work';\nimport MuiFeaturedPlayListIcon from '@material-ui/icons/FeaturedPlayList';\n\nexport const icons = {\n brokenImage: MuiBrokenImageIcon as IconComponent,\n // To be confirmed: see https://github.com/backstage/backstage/issues/4970\n catalog: MuiMenuBookIcon as IconComponent,\n scaffolder: MuiCreateNewFolderIcon as IconComponent,\n techdocs: MuiSubjectIcon as IconComponent,\n search: MuiSearchIcon as IconComponent,\n chat: MuiChatIcon as IconComponent,\n dashboard: MuiDashboardIcon as IconComponent,\n docs: MuiDocsIcon as IconComponent,\n email: MuiEmailIcon as IconComponent,\n github: MuiGitHubIcon as IconComponent,\n group: MuiPeopleIcon as IconComponent,\n help: MuiHelpIcon as IconComponent,\n 'kind:api': MuiExtensionIcon as IconComponent,\n 'kind:component': MuiMemoryIcon as IconComponent,\n 'kind:domain': MuiApartmentIcon as IconComponent,\n 'kind:group': MuiPeopleIcon as IconComponent,\n 'kind:location': MuiLocationOnIcon as IconComponent,\n 'kind:system': MuiCategoryIcon as IconComponent,\n 'kind:user': MuiPersonIcon as IconComponent,\n 'kind:resource': MuiWorkIcon as IconComponent,\n 'kind:template': MuiFeaturedPlayListIcon as IconComponent,\n user: MuiPersonIcon as IconComponent,\n warning: MuiWarningIcon as IconComponent,\n};\n","/*\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 from 'react';\nimport {\n UnifiedThemeProvider,\n themes as builtinThemes,\n} from '@backstage/theme';\nimport DarkIcon from '@material-ui/icons/Brightness2';\nimport LightIcon from '@material-ui/icons/WbSunny';\nimport { createThemeExtension } from '@backstage/frontend-plugin-api';\n\nexport const LightTheme = createThemeExtension({\n id: 'light',\n title: 'Light Theme',\n variant: 'light',\n icon: <LightIcon />,\n Provider: ({ children }) => (\n <UnifiedThemeProvider theme={builtinThemes.light} children={children} />\n ),\n});\n\nexport const DarkTheme = createThemeExtension({\n id: 'dark',\n title: 'Dark Theme',\n variant: 'dark',\n icon: <DarkIcon />,\n Provider: ({ children }) => (\n <UnifiedThemeProvider theme={builtinThemes.dark} children={children} />\n ),\n});\n","/*\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, Config } from '@backstage/config';\nimport {\n BackstagePlugin,\n coreExtensionData,\n ExtensionDataRef,\n} from '@backstage/frontend-plugin-api';\nimport { Core } from '../extensions/Core';\nimport { CoreRoutes } from '../extensions/CoreRoutes';\nimport { CoreLayout } from '../extensions/CoreLayout';\nimport { CoreNav } from '../extensions/CoreNav';\nimport {\n createExtensionInstance,\n ExtensionInstance,\n} from './createExtensionInstance';\nimport {\n ExtensionInstanceParameters,\n mergeExtensionParameters,\n readAppExtensionParameters,\n} from './parameters';\nimport { RoutingProvider } from '../routing/RoutingContext';\nimport {\n AnyApiFactory,\n ApiHolder,\n AppComponents,\n AppContext,\n appThemeApiRef,\n ConfigApi,\n configApiRef,\n IconComponent,\n RouteRef,\n BackstagePlugin as LegacyBackstagePlugin,\n featureFlagsApiRef,\n attachComponentData,\n useRouteRef,\n identityApiRef,\n AppTheme,\n} from '@backstage/core-plugin-api';\nimport { getAvailablePlugins } from './discovery';\nimport {\n ApiFactoryRegistry,\n ApiProvider,\n ApiResolver,\n AppThemeSelector,\n} from '@backstage/core-app-api';\n\n// TODO: Get rid of all of these\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { AppThemeProvider } from '../../../core-app-api/src/app/AppThemeProvider';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { AppIdentityProxy } from '../../../core-app-api/src/apis/implementations/IdentityApi/AppIdentityProxy';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { AppContextProvider } from '../../../core-app-api/src/app/AppContext';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { LocalStorageFeatureFlags } from '../../../core-app-api/src/apis/implementations/FeatureFlagsApi/LocalStorageFeatureFlags';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { defaultConfigLoaderSync } from '../../../core-app-api/src/app/defaultConfigLoader';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { overrideBaseUrlConfigs } from '../../../core-app-api/src/app/overrideBaseUrlConfigs';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport {\n apis as defaultApis,\n components as defaultComponents,\n icons as defaultIcons,\n} from '../../../app-defaults/src/defaults';\nimport { BrowserRouter, Route } from 'react-router-dom';\nimport { SidebarItem } from '@backstage/core-components';\nimport { DarkTheme, LightTheme } from '../extensions/themes';\n\n/** @public */\nexport interface ExtensionTreeNode {\n id: string;\n getData<T>(ref: ExtensionDataRef<T>): T | undefined;\n}\n\n/** @public */\nexport interface ExtensionTree {\n getExtension(id: string): ExtensionTreeNode | undefined;\n getExtensionAttachments(id: string, inputName: string): ExtensionTreeNode[];\n getRootRoutes(): JSX.Element[];\n getSidebarItems(): JSX.Element[];\n}\n\n/** @public */\nexport function createExtensionTree(options: {\n config: Config;\n}): ExtensionTree {\n const plugins = getAvailablePlugins();\n const { instances } = createInstances({\n plugins,\n config: options.config,\n });\n\n return {\n getExtension(id: string): ExtensionTreeNode | undefined {\n return instances.get(id);\n },\n getExtensionAttachments(\n id: string,\n inputName: string,\n ): ExtensionTreeNode[] {\n return instances.get(id)?.attachments.get(inputName) ?? [];\n },\n getRootRoutes(): JSX.Element[] {\n return this.getExtensionAttachments('core.routes', 'routes').map(node => {\n const path = node.getData(coreExtensionData.routePath);\n const element = node.getData(coreExtensionData.reactElement);\n const routeRef = node.getData(coreExtensionData.routeRef);\n if (!path || !element) {\n throw new Error(`Invalid route extension: ${node.id}`);\n }\n const Component = () => {\n return element;\n };\n attachComponentData(Component, 'core.mountPoint', routeRef);\n\n return <Route path={path} element={<Component />} />;\n });\n },\n getSidebarItems(): JSX.Element[] {\n const RoutedSidebarItem = (props: {\n title: string;\n routeRef: RouteRef;\n icon: IconComponent;\n }): React.JSX.Element => {\n const location = useRouteRef(props.routeRef);\n return (\n <SidebarItem icon={props.icon} to={location()} text={props.title} />\n );\n };\n\n return this.getExtensionAttachments('core.nav', 'items')\n .map((node, index) => {\n const target = node.getData(coreExtensionData.navTarget);\n if (!target) {\n return null;\n }\n return (\n <RoutedSidebarItem\n key={index}\n title={target.title}\n icon={target.icon}\n routeRef={target.routeRef}\n />\n );\n })\n .filter((x): x is JSX.Element => !!x);\n },\n };\n}\n\n/**\n * @internal\n */\nexport function createInstances(options: {\n plugins: BackstagePlugin[];\n config: Config;\n}) {\n const builtinExtensions = [\n Core,\n CoreRoutes,\n CoreNav,\n CoreLayout,\n LightTheme,\n DarkTheme,\n ];\n\n // pull in default extension instance from discovered packages\n // apply config to adjust default extension instances and add more\n const extensionParams = mergeExtensionParameters({\n sources: options.plugins,\n builtinExtensions,\n parameters: readAppExtensionParameters(options.config),\n });\n\n // TODO: validate the config of all extension instances\n // We do it at this point to ensure that merging (if any) of config has already happened\n\n // Create attachment map so that we can look attachments up during instance creation\n const attachmentMap = new Map<\n string,\n Map<string, ExtensionInstanceParameters[]>\n >();\n for (const instanceParams of extensionParams) {\n const [extensionId, pointId = 'default'] = instanceParams.at.split('/');\n\n let pointMap = attachmentMap.get(extensionId);\n if (!pointMap) {\n pointMap = new Map();\n attachmentMap.set(extensionId, pointMap);\n }\n\n let instances = pointMap.get(pointId);\n if (!instances) {\n instances = [];\n pointMap.set(pointId, instances);\n }\n\n instances.push(instanceParams);\n }\n\n const instances = new Map<string, ExtensionInstance>();\n\n function createInstance(\n instanceParams: ExtensionInstanceParameters,\n ): ExtensionInstance {\n const extensionId = instanceParams.extension.id;\n const existingInstance = instances.get(extensionId);\n if (existingInstance) {\n return existingInstance;\n }\n\n const attachments = new Map(\n Array.from(attachmentMap.get(extensionId)?.entries() ?? []).map(\n ([inputName, attachmentConfigs]) => {\n return [inputName, attachmentConfigs.map(createInstance)];\n },\n ),\n );\n\n const newInstance = createExtensionInstance({\n extension: instanceParams.extension,\n source: instanceParams.source,\n config: instanceParams.config,\n attachments,\n });\n\n instances.set(extensionId, newInstance);\n\n return newInstance;\n }\n\n const rootConfigs = attachmentMap.get('root')?.get('default') ?? [];\n\n const rootInstances = rootConfigs.map(instanceParams =>\n createInstance(instanceParams),\n );\n\n return { instances, rootInstances };\n}\n\n/** @public */\nexport function createApp(options: {\n plugins: BackstagePlugin[];\n configLoader?: () => Promise<ConfigApi>;\n pluginLoader?: (ctx: { config: ConfigApi }) => Promise<BackstagePlugin[]>;\n}): {\n createRoot(): JSX.Element;\n} {\n async function appLoader() {\n const config =\n (await options?.configLoader?.()) ??\n ConfigReader.fromConfigs(\n overrideBaseUrlConfigs(defaultConfigLoaderSync()),\n );\n\n const discoveredPlugins = getAvailablePlugins();\n const loadedPlugins = (await options.pluginLoader?.({ config })) ?? [];\n const allPlugins = Array.from(\n new Set([...discoveredPlugins, ...options.plugins, ...loadedPlugins]),\n );\n\n const { rootInstances } = createInstances({\n plugins: allPlugins,\n config,\n });\n\n const routePaths = extractRouteInfoFromInstanceTree(rootInstances);\n\n const coreInstance = rootInstances.find(({ id }) => id === 'core');\n if (!coreInstance) {\n throw Error('Unable to find core extension instance');\n }\n\n const apiHolder = createApiHolder(coreInstance, config);\n\n const appContext = createLegacyAppContext(allPlugins);\n\n const rootElements = rootInstances\n .map(e => (\n <React.Fragment key={e.id}>\n {e.getData(coreExtensionData.reactElement)}\n </React.Fragment>\n ))\n .filter((x): x is JSX.Element => !!x);\n\n const App = () => (\n <ApiProvider apis={apiHolder}>\n <AppContextProvider appContext={appContext}>\n <AppThemeProvider>\n <RoutingProvider routePaths={routePaths}>\n {/* TODO: set base path using the logic from AppRouter */}\n <BrowserRouter>{rootElements}</BrowserRouter>\n </RoutingProvider>\n </AppThemeProvider>\n </AppContextProvider>\n </ApiProvider>\n );\n\n return { default: App };\n }\n\n return {\n createRoot() {\n const LazyApp = React.lazy(appLoader);\n return (\n <React.Suspense fallback=\"Loading...\">\n <LazyApp />\n </React.Suspense>\n );\n },\n };\n}\n\nfunction toLegacyPlugin(plugin: BackstagePlugin): LegacyBackstagePlugin {\n const errorMsg = 'Not implemented in legacy plugin compatibility layer';\n const notImplemented = () => {\n throw new Error(errorMsg);\n };\n return {\n getId(): string {\n return plugin.id;\n },\n get routes(): never {\n throw new Error(errorMsg);\n },\n get externalRoutes(): never {\n throw new Error(errorMsg);\n },\n getApis: notImplemented,\n getFeatureFlags: notImplemented,\n provide: notImplemented,\n };\n}\n\nfunction createLegacyAppContext(plugins: BackstagePlugin[]): AppContext {\n return {\n getPlugins(): LegacyBackstagePlugin[] {\n return plugins.map(toLegacyPlugin);\n },\n\n getSystemIcon(key: string): IconComponent | undefined {\n return key in defaultIcons\n ? defaultIcons[key as keyof typeof defaultIcons]\n : undefined;\n },\n\n getSystemIcons(): Record<string, IconComponent> {\n return defaultIcons;\n },\n\n getComponents(): AppComponents {\n return defaultComponents;\n },\n };\n}\n\nfunction createApiHolder(\n coreExtension: ExtensionInstance,\n configApi: ConfigApi,\n): ApiHolder {\n const factoryRegistry = new ApiFactoryRegistry();\n\n const pluginApis =\n coreExtension.attachments\n .get('apis')\n ?.map(e => e.getData(coreExtensionData.apiFactory))\n .filter((x): x is AnyApiFactory => !!x) ?? [];\n\n const themeExtensions =\n coreExtension.attachments\n .get('themes')\n ?.map(e => e.getData(coreExtensionData.theme))\n .filter((x): x is AppTheme => !!x) ?? [];\n\n for (const factory of [...defaultApis, ...pluginApis]) {\n factoryRegistry.register('default', factory);\n }\n\n // TODO: properly discovery feature flags, maybe rework the whole thing\n factoryRegistry.register('default', {\n api: featureFlagsApiRef,\n deps: {},\n factory: () => new LocalStorageFeatureFlags(),\n });\n\n factoryRegistry.register('static', {\n api: identityApiRef,\n deps: {},\n factory: () => {\n const appIdentityProxy = new AppIdentityProxy();\n // TODO: Remove this when sign-in page is migrated\n appIdentityProxy.setTarget(\n {\n getUserId: () => 'guest',\n getIdToken: async () => undefined,\n getProfile: () => ({\n email: 'guest@example.com',\n displayName: 'Guest',\n }),\n getProfileInfo: async () => ({\n email: 'guest@example.com',\n displayName: 'Guest',\n }),\n getBackstageIdentity: async () => ({\n type: 'user',\n userEntityRef: 'user:default/guest',\n ownershipEntityRefs: ['user:default/guest'],\n }),\n getCredentials: async () => ({}),\n signOut: async () => {},\n },\n { signOutTargetUrl: '/' },\n );\n return appIdentityProxy;\n },\n });\n\n factoryRegistry.register('static', {\n api: appThemeApiRef,\n deps: {},\n // TODO: add extension for registering themes\n factory: () => AppThemeSelector.createWithStorage(themeExtensions),\n });\n\n factoryRegistry.register('static', {\n api: configApiRef,\n deps: {},\n factory: () => configApi,\n });\n\n // TODO: ship these as default extensions instead\n for (const factory of defaultApis as AnyApiFactory[]) {\n if (!factoryRegistry.register('app', factory)) {\n throw new Error(\n `Duplicate or forbidden API factory for ${factory.api} in app`,\n );\n }\n }\n\n ApiResolver.validateFactories(factoryRegistry, factoryRegistry.getAllApis());\n\n return new ApiResolver(factoryRegistry);\n}\n\n/** @internal */\nexport function extractRouteInfoFromInstanceTree(\n roots: ExtensionInstance[],\n): Map<RouteRef, string> {\n const results = new Map<RouteRef, string>();\n\n function visit(current: ExtensionInstance, basePath: string) {\n const routePath = current.getData(coreExtensionData.routePath) ?? '';\n const routeRef = current.getData(coreExtensionData.routeRef);\n\n // TODO: join paths in a more robust way\n const fullPath = basePath + routePath;\n if (routeRef) {\n const routeRefId = (routeRef as any).id; // TODO: properly\n if (routeRefId !== current.id) {\n throw new Error(\n `Route ref '${routeRefId}' must have the same ID as extension '${current.id}'`,\n );\n }\n results.set(routeRef, fullPath);\n }\n\n for (const children of current.attachments.values()) {\n for (const child of children) {\n visit(child, fullPath);\n }\n }\n }\n\n for (const root of roots) {\n visit(root, '');\n }\n return results;\n}\n"],"names":["useStyles","id","__publicField","builtinThemes","useRouteRef","instances","_a","_b","defaultIcons","defaultComponents","defaultApis"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBO,MAAM,OAAO,eAAgB,CAAA;AAAA,EAClC,EAAI,EAAA,MAAA;AAAA,EACJ,EAAI,EAAA,MAAA;AAAA,EACJ,MAAQ,EAAA;AAAA,IACN,MAAM,oBAAqB,CAAA;AAAA,MACzB,KAAK,iBAAkB,CAAA,UAAA;AAAA,KACxB,CAAA;AAAA,GACH;AAAA,EACA,QAAQ,EAAC;AAAA,EACT,OAAU,GAAA;AAAA,GAAC;AACb,CAAC,CAAA;;ACRM,MAAM,aAAa,eAAgB,CAAA;AAAA,EACxC,EAAI,EAAA,aAAA;AAAA,EACJ,EAAI,EAAA,qBAAA;AAAA,EACJ,MAAQ,EAAA;AAAA,IACN,QAAQ,oBAAqB,CAAA;AAAA,MAC3B,MAAM,iBAAkB,CAAA,SAAA;AAAA,MACxB,GAAA,EAAK,iBA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10 @@
|
|
|
23
23
|
"postpack": "backstage-cli package postpack"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@backstage/cli": "^0.
|
|
27
|
-
"@
|
|
26
|
+
"@backstage/cli": "^0.23.0-next.1",
|
|
27
|
+
"@backstage/test-utils": "^1.4.4-next.1",
|
|
28
|
+
"@testing-library/jest-dom": "^5.10.1",
|
|
29
|
+
"@testing-library/react": "^12.1.3"
|
|
28
30
|
},
|
|
29
31
|
"configSchema": "config.d.ts",
|
|
30
32
|
"files": [
|
|
@@ -33,13 +35,15 @@
|
|
|
33
35
|
],
|
|
34
36
|
"dependencies": {
|
|
35
37
|
"@backstage/config": "^1.1.0",
|
|
36
|
-
"@backstage/core-app-api": "^1.10.
|
|
37
|
-
"@backstage/core-components": "^0.13.
|
|
38
|
-
"@backstage/core-plugin-api": "^1.
|
|
39
|
-
"@backstage/frontend-plugin-api": "^0.1.
|
|
40
|
-
"@backstage/plugin-graphiql": "^0.2.
|
|
38
|
+
"@backstage/core-app-api": "^1.10.1-next.1",
|
|
39
|
+
"@backstage/core-components": "^0.13.6-next.1",
|
|
40
|
+
"@backstage/core-plugin-api": "^1.7.0-next.0",
|
|
41
|
+
"@backstage/frontend-plugin-api": "^0.1.1-next.1",
|
|
42
|
+
"@backstage/plugin-graphiql": "^0.2.55-next.1",
|
|
43
|
+
"@backstage/theme": "^0.4.2",
|
|
41
44
|
"@backstage/types": "^1.1.1",
|
|
42
45
|
"@material-ui/core": "^4.12.4",
|
|
46
|
+
"@material-ui/icons": "^4.11.3",
|
|
43
47
|
"@types/react": "^16.13.1 || ^17.0.0",
|
|
44
48
|
"lodash": "^4.17.21"
|
|
45
49
|
},
|