@backstage/app-defaults 1.5.4 → 1.5.5-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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # @backstage/app-defaults
2
2
 
3
+ ## 1.5.5-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/core-components@0.14.6-next.1
9
+
10
+ ## 1.5.5-next.0
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+ - @backstage/theme@0.5.4-next.0
16
+ - @backstage/core-components@0.14.5-next.0
17
+ - @backstage/core-app-api@1.12.4
18
+ - @backstage/core-plugin-api@1.9.2
19
+ - @backstage/plugin-permission-react@0.4.22
20
+
3
21
  ## 1.5.4
4
22
 
5
23
  ### Patch Changes
@@ -0,0 +1,30 @@
1
+ import { apis } from './defaults/apis.esm.js';
2
+ import { components } from './defaults/components.esm.js';
3
+ import { icons } from './defaults/icons.esm.js';
4
+ import { themes } from './defaults/themes.esm.js';
5
+ import { createSpecializedApp } from '@backstage/core-app-api';
6
+
7
+ function createApp(options) {
8
+ var _a, _b, _c, _d;
9
+ return createSpecializedApp({
10
+ ...options,
11
+ apis: (_a = options == null ? void 0 : options.apis) != null ? _a : [],
12
+ bindRoutes: options == null ? void 0 : options.bindRoutes,
13
+ components: {
14
+ ...components,
15
+ ...options == null ? void 0 : options.components
16
+ },
17
+ configLoader: options == null ? void 0 : options.configLoader,
18
+ defaultApis: apis,
19
+ icons: {
20
+ ...icons,
21
+ ...options == null ? void 0 : options.icons
22
+ },
23
+ plugins: (_b = options == null ? void 0 : options.plugins) != null ? _b : [],
24
+ featureFlags: (_c = options == null ? void 0 : options.featureFlags) != null ? _c : [],
25
+ themes: (_d = options == null ? void 0 : options.themes) != null ? _d : themes
26
+ });
27
+ }
28
+
29
+ export { createApp };
30
+ //# sourceMappingURL=createApp.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createApp.esm.js","sources":["../src/createApp.tsx"],"sourcesContent":["/*\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 { apis, components, icons, themes } from './defaults';\nimport {\n AppTheme,\n BackstagePlugin,\n IconComponent,\n} from '@backstage/core-plugin-api';\nimport {\n AppComponents,\n AppOptions,\n AppIcons,\n createSpecializedApp,\n} from '@backstage/core-app-api';\n\n/**\n * Creates a new Backstage App using a default set of components, icons and themes unless\n * they are explicitly provided.\n *\n * @public\n */\nexport function createApp(\n options?: Omit<AppOptions, keyof OptionalAppOptions> & OptionalAppOptions,\n) {\n return createSpecializedApp({\n ...options,\n apis: options?.apis ?? [],\n bindRoutes: options?.bindRoutes,\n components: {\n ...components,\n ...options?.components,\n },\n configLoader: options?.configLoader,\n defaultApis: apis,\n icons: {\n ...icons,\n ...options?.icons,\n },\n plugins: (options?.plugins as BackstagePlugin[]) ?? [],\n featureFlags: options?.featureFlags ?? [],\n themes: options?.themes ?? themes,\n });\n}\n\n/**\n * The set of app options that {@link createApp} will provide defaults for\n * if they are not passed in explicitly.\n *\n * @public\n */\nexport type OptionalAppOptions = {\n /**\n * A set of icons to override the default icons with.\n *\n * The override is applied for each icon individually.\n *\n * @public\n */\n icons?: Partial<AppIcons> & {\n [key in string]: IconComponent;\n };\n\n /**\n * A set of themes that override all of the default app themes.\n *\n * If this option is provided none of the default themes will be used.\n *\n * @public\n */\n themes?: (Partial<AppTheme> & Omit<AppTheme, 'theme'>)[]; // TODO: simplify once AppTheme is updated\n\n /**\n * A set of components to override the default components with.\n *\n * The override is applied for each icon individually.\n *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B,CAAA,CAAA;AACH;;;;"}
@@ -0,0 +1,221 @@
1
+ import { UrlPatternDiscovery, AlertApiForwarder, NoOpAnalyticsApi, ErrorAlerter, ErrorApiForwarder, UnhandledErrorForwarder, WebStorage, createFetchApi, FetchMiddlewares, OAuthRequestManager, GoogleAuth, MicrosoftAuth, GithubAuth, OktaAuth, GitlabAuth, OneLoginAuth, BitbucketAuth, BitbucketServerAuth, AtlassianAuth, VMwareCloudAuth } from '@backstage/core-app-api';
2
+ import { createApiFactory, discoveryApiRef, configApiRef, alertApiRef, analyticsApiRef, errorApiRef, storageApiRef, fetchApiRef, identityApiRef, oauthRequestApiRef, googleAuthApiRef, microsoftAuthApiRef, githubAuthApiRef, oktaAuthApiRef, gitlabAuthApiRef, oneloginAuthApiRef, bitbucketAuthApiRef, bitbucketServerAuthApiRef, atlassianAuthApiRef, vmwareCloudAuthApiRef } from '@backstage/core-plugin-api';
3
+ import { permissionApiRef, IdentityPermissionApi } from '@backstage/plugin-permission-react';
4
+
5
+ const apis = [
6
+ createApiFactory({
7
+ api: discoveryApiRef,
8
+ deps: { configApi: configApiRef },
9
+ factory: ({ configApi }) => UrlPatternDiscovery.compile(
10
+ `${configApi.getString("backend.baseUrl")}/api/{{ pluginId }}`
11
+ )
12
+ }),
13
+ createApiFactory({
14
+ api: alertApiRef,
15
+ deps: {},
16
+ factory: () => new AlertApiForwarder()
17
+ }),
18
+ createApiFactory({
19
+ api: analyticsApiRef,
20
+ deps: {},
21
+ factory: () => new NoOpAnalyticsApi()
22
+ }),
23
+ createApiFactory({
24
+ api: errorApiRef,
25
+ deps: { alertApi: alertApiRef },
26
+ factory: ({ alertApi }) => {
27
+ const errorApi = new ErrorAlerter(alertApi, new ErrorApiForwarder());
28
+ UnhandledErrorForwarder.forward(errorApi, { hidden: false });
29
+ return errorApi;
30
+ }
31
+ }),
32
+ createApiFactory({
33
+ api: storageApiRef,
34
+ deps: { errorApi: errorApiRef },
35
+ factory: ({ errorApi }) => WebStorage.create({ errorApi })
36
+ }),
37
+ createApiFactory({
38
+ api: fetchApiRef,
39
+ deps: {
40
+ configApi: configApiRef,
41
+ identityApi: identityApiRef,
42
+ discoveryApi: discoveryApiRef
43
+ },
44
+ factory: ({ configApi, identityApi, discoveryApi }) => {
45
+ return createFetchApi({
46
+ middleware: [
47
+ FetchMiddlewares.resolvePluginProtocol({
48
+ discoveryApi
49
+ }),
50
+ FetchMiddlewares.injectIdentityAuth({
51
+ identityApi,
52
+ config: configApi
53
+ })
54
+ ]
55
+ });
56
+ }
57
+ }),
58
+ createApiFactory({
59
+ api: oauthRequestApiRef,
60
+ deps: {},
61
+ factory: () => new OAuthRequestManager()
62
+ }),
63
+ createApiFactory({
64
+ api: googleAuthApiRef,
65
+ deps: {
66
+ discoveryApi: discoveryApiRef,
67
+ oauthRequestApi: oauthRequestApiRef,
68
+ configApi: configApiRef
69
+ },
70
+ factory: ({ discoveryApi, oauthRequestApi, configApi }) => GoogleAuth.create({
71
+ configApi,
72
+ discoveryApi,
73
+ oauthRequestApi,
74
+ environment: configApi.getOptionalString("auth.environment")
75
+ })
76
+ }),
77
+ createApiFactory({
78
+ api: microsoftAuthApiRef,
79
+ deps: {
80
+ discoveryApi: discoveryApiRef,
81
+ oauthRequestApi: oauthRequestApiRef,
82
+ configApi: configApiRef
83
+ },
84
+ factory: ({ discoveryApi, oauthRequestApi, configApi }) => MicrosoftAuth.create({
85
+ configApi,
86
+ discoveryApi,
87
+ oauthRequestApi,
88
+ environment: configApi.getOptionalString("auth.environment")
89
+ })
90
+ }),
91
+ createApiFactory({
92
+ api: githubAuthApiRef,
93
+ deps: {
94
+ discoveryApi: discoveryApiRef,
95
+ oauthRequestApi: oauthRequestApiRef,
96
+ configApi: configApiRef
97
+ },
98
+ factory: ({ discoveryApi, oauthRequestApi, configApi }) => GithubAuth.create({
99
+ configApi,
100
+ discoveryApi,
101
+ oauthRequestApi,
102
+ defaultScopes: ["read:user"],
103
+ environment: configApi.getOptionalString("auth.environment")
104
+ })
105
+ }),
106
+ createApiFactory({
107
+ api: oktaAuthApiRef,
108
+ deps: {
109
+ discoveryApi: discoveryApiRef,
110
+ oauthRequestApi: oauthRequestApiRef,
111
+ configApi: configApiRef
112
+ },
113
+ factory: ({ discoveryApi, oauthRequestApi, configApi }) => OktaAuth.create({
114
+ configApi,
115
+ discoveryApi,
116
+ oauthRequestApi,
117
+ environment: configApi.getOptionalString("auth.environment")
118
+ })
119
+ }),
120
+ createApiFactory({
121
+ api: gitlabAuthApiRef,
122
+ deps: {
123
+ discoveryApi: discoveryApiRef,
124
+ oauthRequestApi: oauthRequestApiRef,
125
+ configApi: configApiRef
126
+ },
127
+ factory: ({ discoveryApi, oauthRequestApi, configApi }) => GitlabAuth.create({
128
+ configApi,
129
+ discoveryApi,
130
+ oauthRequestApi,
131
+ environment: configApi.getOptionalString("auth.environment")
132
+ })
133
+ }),
134
+ createApiFactory({
135
+ api: oneloginAuthApiRef,
136
+ deps: {
137
+ discoveryApi: discoveryApiRef,
138
+ oauthRequestApi: oauthRequestApiRef,
139
+ configApi: configApiRef
140
+ },
141
+ factory: ({ discoveryApi, oauthRequestApi, configApi }) => OneLoginAuth.create({
142
+ configApi,
143
+ discoveryApi,
144
+ oauthRequestApi,
145
+ environment: configApi.getOptionalString("auth.environment")
146
+ })
147
+ }),
148
+ createApiFactory({
149
+ api: bitbucketAuthApiRef,
150
+ deps: {
151
+ discoveryApi: discoveryApiRef,
152
+ oauthRequestApi: oauthRequestApiRef,
153
+ configApi: configApiRef
154
+ },
155
+ factory: ({ discoveryApi, oauthRequestApi, configApi }) => BitbucketAuth.create({
156
+ configApi,
157
+ discoveryApi,
158
+ oauthRequestApi,
159
+ defaultScopes: ["account"],
160
+ environment: configApi.getOptionalString("auth.environment")
161
+ })
162
+ }),
163
+ createApiFactory({
164
+ api: bitbucketServerAuthApiRef,
165
+ deps: {
166
+ discoveryApi: discoveryApiRef,
167
+ oauthRequestApi: oauthRequestApiRef,
168
+ configApi: configApiRef
169
+ },
170
+ factory: ({ discoveryApi, oauthRequestApi, configApi }) => BitbucketServerAuth.create({
171
+ configApi,
172
+ discoveryApi,
173
+ oauthRequestApi,
174
+ defaultScopes: ["REPO_READ"]
175
+ })
176
+ }),
177
+ createApiFactory({
178
+ api: atlassianAuthApiRef,
179
+ deps: {
180
+ discoveryApi: discoveryApiRef,
181
+ oauthRequestApi: oauthRequestApiRef,
182
+ configApi: configApiRef
183
+ },
184
+ factory: ({ discoveryApi, oauthRequestApi, configApi }) => {
185
+ return AtlassianAuth.create({
186
+ configApi,
187
+ discoveryApi,
188
+ oauthRequestApi,
189
+ environment: configApi.getOptionalString("auth.environment")
190
+ });
191
+ }
192
+ }),
193
+ createApiFactory({
194
+ api: vmwareCloudAuthApiRef,
195
+ deps: {
196
+ discoveryApi: discoveryApiRef,
197
+ oauthRequestApi: oauthRequestApiRef,
198
+ configApi: configApiRef
199
+ },
200
+ factory: ({ discoveryApi, oauthRequestApi, configApi }) => {
201
+ return VMwareCloudAuth.create({
202
+ configApi,
203
+ discoveryApi,
204
+ oauthRequestApi,
205
+ environment: configApi.getOptionalString("auth.environment")
206
+ });
207
+ }
208
+ }),
209
+ createApiFactory({
210
+ api: permissionApiRef,
211
+ deps: {
212
+ discovery: discoveryApiRef,
213
+ identity: identityApiRef,
214
+ config: configApiRef
215
+ },
216
+ factory: ({ config, discovery, identity }) => IdentityPermissionApi.create({ config, discovery, identity })
217
+ })
218
+ ];
219
+
220
+ export { apis };
221
+ //# sourceMappingURL=apis.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apis.esm.js","sources":["../../src/defaults/apis.ts"],"sourcesContent":["/*\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 VMwareCloudAuth,\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 vmwareCloudAuthApiRef,\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: ['account'],\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: vmwareCloudAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) => {\n return VMwareCloudAuth.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"],"names":[],"mappings":";;;;AAkEO,MAAM,IAAO,GAAA;AAAA,EAClB,gBAAiB,CAAA;AAAA,IACf,GAAK,EAAA,eAAA;AAAA,IACL,IAAA,EAAM,EAAE,SAAA,EAAW,YAAa,EAAA;AAAA,IAChC,OAAS,EAAA,CAAC,EAAE,SAAA,OACV,mBAAoB,CAAA,OAAA;AAAA,MAClB,CAAG,EAAA,SAAA,CAAU,SAAU,CAAA,iBAAiB,CAAC,CAAA,mBAAA,CAAA;AAAA,KAC3C;AAAA,GACH,CAAA;AAAA,EACD,gBAAiB,CAAA;AAAA,IACf,GAAK,EAAA,WAAA;AAAA,IACL,MAAM,EAAC;AAAA,IACP,OAAA,EAAS,MAAM,IAAI,iBAAkB,EAAA;AAAA,GACtC,CAAA;AAAA,EACD,gBAAiB,CAAA;AAAA,IACf,GAAK,EAAA,eAAA;AAAA,IACL,MAAM,EAAC;AAAA,IACP,OAAA,EAAS,MAAM,IAAI,gBAAiB,EAAA;AAAA,GACrC,CAAA;AAAA,EACD,gBAAiB,CAAA;AAAA,IACf,GAAK,EAAA,WAAA;AAAA,IACL,IAAA,EAAM,EAAE,QAAA,EAAU,WAAY,EAAA;AAAA,IAC9B,OAAS,EAAA,CAAC,EAAE,QAAA,EAAe,KAAA;AACzB,MAAA,MAAM,WAAW,IAAI,YAAA,CAAa,QAAU,EAAA,IAAI,mBAAmB,CAAA,CAAA;AACnE,MAAA,uBAAA,CAAwB,OAAQ,CAAA,QAAA,EAA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AAA;AAAA,IACf,GAAK,EAAA,qBAAA;AAAA,IACL,IAAM,EAAA;AAAA,MACJ,YAAc,EAAA,eAAA;AAAA,MACd,eAAiB,EAAA,kBAAA;AAAA,MACjB,SAAW,EAAA,YAAA;AAAA,KACb;AAAA,IACA,SAAS,CAAC,EAAE,YAAc,EAAA,eAAA,EAAiB,WAAgB,KAAA;AACzD,MAAA,OAAO,gBAAgB,MAAO,CAAA;AAAA,QAC5B,SAAA;AAAA,QACA,YAAA;AAAA,QACA,eAAA;AAAA,QACA,WAAA,EAAa,SAAU,CAAA,iBAAA,CAAkB,kBAAkB,CAAA;AAAA,OAC5D,CAAA,CAAA;AAAA,KACH;AAAA,GACD,CAAA;AAAA,EACD,gBAAiB,CAAA;AAAA,IACf,GAAK,EAAA,gBAAA;AAAA,IACL,IAAM,EAAA;AAAA,MACJ,SAAW,EAAA,eAAA;AAAA,MACX,QAAU,EAAA,cAAA;AAAA,MACV,MAAQ,EAAA,YAAA;AAAA,KACV;AAAA,IACA,OAAS,EAAA,CAAC,EAAE,MAAA,EAAQ,SAAW,EAAA,QAAA,EAC7B,KAAA,qBAAA,CAAsB,MAAO,CAAA,EAAE,MAAQ,EAAA,SAAA,EAAW,UAAU,CAAA;AAAA,GAC/D,CAAA;AACH;;;;"}
@@ -0,0 +1,46 @@
1
+ import React from 'react';
2
+ import Button from '@material-ui/core/Button';
3
+ import { Progress, ErrorPage, ErrorPanel } from '@backstage/core-components';
4
+ import { BrowserRouter, useInRouterContext, MemoryRouter } from 'react-router-dom';
5
+
6
+ function OptionallyWrapInRouter({ children }) {
7
+ if (useInRouterContext()) {
8
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, children);
9
+ }
10
+ return /* @__PURE__ */ React.createElement(MemoryRouter, null, children);
11
+ }
12
+ const DefaultNotFoundPage = () => /* @__PURE__ */ React.createElement(ErrorPage, { status: "404", statusMessage: "PAGE NOT FOUND" });
13
+ const DefaultBootErrorPage = ({ step, error }) => {
14
+ let message = "";
15
+ if (step === "load-config") {
16
+ message = `The configuration failed to load, someone should have a look at this error: ${error.message}`;
17
+ } else if (step === "load-chunk") {
18
+ message = `Lazy loaded chunk failed to load, try to reload the page: ${error.message}`;
19
+ }
20
+ return /* @__PURE__ */ React.createElement(OptionallyWrapInRouter, null, /* @__PURE__ */ React.createElement(ErrorPage, { statusMessage: message, stack: error.stack }));
21
+ };
22
+ const DefaultErrorBoundaryFallback = ({
23
+ error,
24
+ resetError,
25
+ plugin
26
+ }) => {
27
+ return /* @__PURE__ */ React.createElement(
28
+ ErrorPanel,
29
+ {
30
+ title: `Error in ${plugin == null ? void 0 : plugin.getId()}`,
31
+ defaultExpanded: true,
32
+ error
33
+ },
34
+ /* @__PURE__ */ React.createElement(Button, { variant: "outlined", onClick: resetError }, "Retry")
35
+ );
36
+ };
37
+ const components = {
38
+ Progress,
39
+ Router: BrowserRouter,
40
+ NotFoundErrorPage: DefaultNotFoundPage,
41
+ BootErrorPage: DefaultBootErrorPage,
42
+ ErrorBoundaryFallback: DefaultErrorBoundaryFallback
43
+ };
44
+
45
+ export { OptionallyWrapInRouter, components };
46
+ //# sourceMappingURL=components.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components.esm.js","sources":["../../src/defaults/components.tsx"],"sourcesContent":["/*\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 statusMessage={message} stack={error.stack} />\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"],"names":[],"mappings":";;;;;AA8BgB,SAAA,sBAAA,CAAuB,EAAE,QAAA,EAAqC,EAAA;AAC5E,EAAA,IAAI,oBAAsB,EAAA;AACxB,IAAA,iEAAU,QAAS,CAAA,CAAA;AAAA,GACrB;AACA,EAAO,uBAAA,KAAA,CAAA,aAAA,CAAC,oBAAc,QAAS,CAAA,CAAA;AACjC,CAAA;AAEA,MAAM,sBAAsB,sBAC1B,KAAA,CAAA,aAAA,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AACzB;;;;"}
@@ -0,0 +1,51 @@
1
+ import MuiApartmentIcon from '@material-ui/icons/Apartment';
2
+ import MuiBrokenImageIcon from '@material-ui/icons/BrokenImage';
3
+ import MuiCategoryIcon from '@material-ui/icons/Category';
4
+ import MuiCreateNewFolderIcon from '@material-ui/icons/CreateNewFolder';
5
+ import MuiSubjectIcon from '@material-ui/icons/Subject';
6
+ import MuiSearchIcon from '@material-ui/icons/Search';
7
+ import MuiChatIcon from '@material-ui/icons/Chat';
8
+ import MuiDashboardIcon from '@material-ui/icons/Dashboard';
9
+ import MuiDocsIcon from '@material-ui/icons/Description';
10
+ import MuiEmailIcon from '@material-ui/icons/Email';
11
+ import MuiExtensionIcon from '@material-ui/icons/Extension';
12
+ import MuiGitHubIcon from '@material-ui/icons/GitHub';
13
+ import MuiHelpIcon from '@material-ui/icons/Help';
14
+ import MuiLocationOnIcon from '@material-ui/icons/LocationOn';
15
+ import MuiMemoryIcon from '@material-ui/icons/Memory';
16
+ import MuiMenuBookIcon from '@material-ui/icons/MenuBook';
17
+ import MuiPeopleIcon from '@material-ui/icons/People';
18
+ import MuiPersonIcon from '@material-ui/icons/Person';
19
+ import MuiWarningIcon from '@material-ui/icons/Warning';
20
+ import MuiStorageIcon from '@material-ui/icons/Storage';
21
+ import MuiFeaturedPlayListIcon from '@material-ui/icons/FeaturedPlayList';
22
+
23
+ const icons = {
24
+ brokenImage: MuiBrokenImageIcon,
25
+ // To be confirmed: see https://github.com/backstage/backstage/issues/4970
26
+ catalog: MuiMenuBookIcon,
27
+ scaffolder: MuiCreateNewFolderIcon,
28
+ techdocs: MuiSubjectIcon,
29
+ search: MuiSearchIcon,
30
+ chat: MuiChatIcon,
31
+ dashboard: MuiDashboardIcon,
32
+ docs: MuiDocsIcon,
33
+ email: MuiEmailIcon,
34
+ github: MuiGitHubIcon,
35
+ group: MuiPeopleIcon,
36
+ help: MuiHelpIcon,
37
+ "kind:api": MuiExtensionIcon,
38
+ "kind:component": MuiMemoryIcon,
39
+ "kind:domain": MuiApartmentIcon,
40
+ "kind:group": MuiPeopleIcon,
41
+ "kind:location": MuiLocationOnIcon,
42
+ "kind:system": MuiCategoryIcon,
43
+ "kind:user": MuiPersonIcon,
44
+ "kind:resource": MuiStorageIcon,
45
+ "kind:template": MuiFeaturedPlayListIcon,
46
+ user: MuiPersonIcon,
47
+ warning: MuiWarningIcon
48
+ };
49
+
50
+ export { icons };
51
+ //# sourceMappingURL=icons.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.esm.js","sources":["../../src/defaults/icons.tsx"],"sourcesContent":["/*\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 MuiStorageIcon from '@material-ui/icons/Storage';\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': MuiStorageIcon as IconComponent,\n 'kind:template': MuiFeaturedPlayListIcon as IconComponent,\n user: MuiPersonIcon as IconComponent,\n warning: MuiWarningIcon as IconComponent,\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuCO,MAAM,KAAQ,GAAA;AAAA,EACnB,WAAa,EAAA,kBAAA;AAAA;AAAA,EAEb,OAAS,EAAA,eAAA;AAAA,EACT,UAAY,EAAA,sBAAA;AAAA,EACZ,QAAU,EAAA,cAAA;AAAA,EACV,MAAQ,EAAA,aAAA;AAAA,EACR,IAAM,EAAA,WAAA;AAAA,EACN,SAAW,EAAA,gBAAA;AAAA,EACX,IAAM,EAAA,WAAA;AAAA,EACN,KAAO,EAAA,YAAA;AAAA,EACP,MAAQ,EAAA,aAAA;AAAA,EACR,KAAO,EAAA,aAAA;AAAA,EACP,IAAM,EAAA,WAAA;AAAA,EACN,UAAY,EAAA,gBAAA;AAAA,EACZ,gBAAkB,EAAA,aAAA;AAAA,EAClB,aAAe,EAAA,gBAAA;AAAA,EACf,YAAc,EAAA,aAAA;AAAA,EACd,eAAiB,EAAA,iBAAA;AAAA,EACjB,aAAe,EAAA,eAAA;AAAA,EACf,WAAa,EAAA,aAAA;AAAA,EACb,eAAiB,EAAA,cAAA;AAAA,EACjB,eAAiB,EAAA,uBAAA;AAAA,EACjB,IAAM,EAAA,aAAA;AAAA,EACN,OAAS,EAAA,cAAA;AACX;;;;"}
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import { UnifiedThemeProvider, themes as themes$1 } from '@backstage/theme';
3
+ import DarkIcon from '@material-ui/icons/Brightness2';
4
+ import LightIcon from '@material-ui/icons/WbSunny';
5
+
6
+ const themes = [
7
+ {
8
+ id: "light",
9
+ title: "Light Theme",
10
+ variant: "light",
11
+ icon: /* @__PURE__ */ React.createElement(LightIcon, null),
12
+ Provider: ({ children }) => /* @__PURE__ */ React.createElement(UnifiedThemeProvider, { theme: themes$1.light, children })
13
+ },
14
+ {
15
+ id: "dark",
16
+ title: "Dark Theme",
17
+ variant: "dark",
18
+ icon: /* @__PURE__ */ React.createElement(DarkIcon, null),
19
+ Provider: ({ children }) => /* @__PURE__ */ React.createElement(UnifiedThemeProvider, { theme: themes$1.dark, children })
20
+ }
21
+ ];
22
+
23
+ export { themes };
24
+ //# sourceMappingURL=themes.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"themes.esm.js","sources":["../../src/defaults/themes.tsx"],"sourcesContent":["/*\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"],"names":["builtinThemes"],"mappings":";;;;;AAyBO,MAAM,MAAqB,GAAA;AAAA,EAChC;AAAA,IACE,EAAI,EAAA,OAAA;AAAA,IACJ,KAAO,EAAA,aAAA;AAAA,IACP,OAAS,EAAA,OAAA;AAAA,IACT,IAAA,sCAAO,SAAU,EAAA,IAAA,CAAA;AAAA,IACjB,QAAA,EAAU,CAAC,EAAE,QAAS,EAAA,yCACnB,oBAAqB,EAAA,EAAA,KAAA,EAAOA,QAAc,CAAA,KAAA,EAAO,QAAoB,EAAA,CAAA;AAAA,GAE1E;AAAA,EACA;AAAA,IACE,EAAI,EAAA,MAAA;AAAA,IACJ,KAAO,EAAA,YAAA;AAAA,IACP,OAAS,EAAA,MAAA;AAAA,IACT,IAAA,sCAAO,QAAS,EAAA,IAAA,CAAA;AAAA,IAChB,QAAA,EAAU,CAAC,EAAE,QAAS,EAAA,yCACnB,oBAAqB,EAAA,EAAA,KAAA,EAAOA,QAAc,CAAA,IAAA,EAAM,QAAoB,EAAA,CAAA;AAAA,GAEzE;AACF;;;;"}
package/dist/index.esm.js CHANGED
@@ -1,354 +1,2 @@
1
- import { UrlPatternDiscovery, AlertApiForwarder, NoOpAnalyticsApi, ErrorAlerter, ErrorApiForwarder, UnhandledErrorForwarder, WebStorage, createFetchApi, FetchMiddlewares, OAuthRequestManager, GoogleAuth, MicrosoftAuth, GithubAuth, OktaAuth, GitlabAuth, OneLoginAuth, BitbucketAuth, BitbucketServerAuth, AtlassianAuth, VMwareCloudAuth, createSpecializedApp } from '@backstage/core-app-api';
2
- import { createApiFactory, discoveryApiRef, configApiRef, alertApiRef, analyticsApiRef, errorApiRef, storageApiRef, fetchApiRef, identityApiRef, oauthRequestApiRef, googleAuthApiRef, microsoftAuthApiRef, githubAuthApiRef, oktaAuthApiRef, gitlabAuthApiRef, oneloginAuthApiRef, bitbucketAuthApiRef, bitbucketServerAuthApiRef, atlassianAuthApiRef, vmwareCloudAuthApiRef } from '@backstage/core-plugin-api';
3
- import { permissionApiRef, IdentityPermissionApi } from '@backstage/plugin-permission-react';
4
- import React from 'react';
5
- import Button from '@material-ui/core/Button';
6
- import { Progress, ErrorPage, ErrorPanel } from '@backstage/core-components';
7
- import { BrowserRouter, useInRouterContext, MemoryRouter } from 'react-router-dom';
8
- import MuiApartmentIcon from '@material-ui/icons/Apartment';
9
- import MuiBrokenImageIcon from '@material-ui/icons/BrokenImage';
10
- import MuiCategoryIcon from '@material-ui/icons/Category';
11
- import MuiCreateNewFolderIcon from '@material-ui/icons/CreateNewFolder';
12
- import MuiSubjectIcon from '@material-ui/icons/Subject';
13
- import MuiSearchIcon from '@material-ui/icons/Search';
14
- import MuiChatIcon from '@material-ui/icons/Chat';
15
- import MuiDashboardIcon from '@material-ui/icons/Dashboard';
16
- import MuiDocsIcon from '@material-ui/icons/Description';
17
- import MuiEmailIcon from '@material-ui/icons/Email';
18
- import MuiExtensionIcon from '@material-ui/icons/Extension';
19
- import MuiGitHubIcon from '@material-ui/icons/GitHub';
20
- import MuiHelpIcon from '@material-ui/icons/Help';
21
- import MuiLocationOnIcon from '@material-ui/icons/LocationOn';
22
- import MuiMemoryIcon from '@material-ui/icons/Memory';
23
- import MuiMenuBookIcon from '@material-ui/icons/MenuBook';
24
- import MuiPeopleIcon from '@material-ui/icons/People';
25
- import MuiPersonIcon from '@material-ui/icons/Person';
26
- import MuiWarningIcon from '@material-ui/icons/Warning';
27
- import MuiStorageIcon from '@material-ui/icons/Storage';
28
- import MuiFeaturedPlayListIcon from '@material-ui/icons/FeaturedPlayList';
29
- import { UnifiedThemeProvider, themes as themes$1 } from '@backstage/theme';
30
- import DarkIcon from '@material-ui/icons/Brightness2';
31
- import LightIcon from '@material-ui/icons/WbSunny';
32
-
33
- const apis = [
34
- createApiFactory({
35
- api: discoveryApiRef,
36
- deps: { configApi: configApiRef },
37
- factory: ({ configApi }) => UrlPatternDiscovery.compile(
38
- `${configApi.getString("backend.baseUrl")}/api/{{ pluginId }}`
39
- )
40
- }),
41
- createApiFactory({
42
- api: alertApiRef,
43
- deps: {},
44
- factory: () => new AlertApiForwarder()
45
- }),
46
- createApiFactory({
47
- api: analyticsApiRef,
48
- deps: {},
49
- factory: () => new NoOpAnalyticsApi()
50
- }),
51
- createApiFactory({
52
- api: errorApiRef,
53
- deps: { alertApi: alertApiRef },
54
- factory: ({ alertApi }) => {
55
- const errorApi = new ErrorAlerter(alertApi, new ErrorApiForwarder());
56
- UnhandledErrorForwarder.forward(errorApi, { hidden: false });
57
- return errorApi;
58
- }
59
- }),
60
- createApiFactory({
61
- api: storageApiRef,
62
- deps: { errorApi: errorApiRef },
63
- factory: ({ errorApi }) => WebStorage.create({ errorApi })
64
- }),
65
- createApiFactory({
66
- api: fetchApiRef,
67
- deps: {
68
- configApi: configApiRef,
69
- identityApi: identityApiRef,
70
- discoveryApi: discoveryApiRef
71
- },
72
- factory: ({ configApi, identityApi, discoveryApi }) => {
73
- return createFetchApi({
74
- middleware: [
75
- FetchMiddlewares.resolvePluginProtocol({
76
- discoveryApi
77
- }),
78
- FetchMiddlewares.injectIdentityAuth({
79
- identityApi,
80
- config: configApi
81
- })
82
- ]
83
- });
84
- }
85
- }),
86
- createApiFactory({
87
- api: oauthRequestApiRef,
88
- deps: {},
89
- factory: () => new OAuthRequestManager()
90
- }),
91
- createApiFactory({
92
- api: googleAuthApiRef,
93
- deps: {
94
- discoveryApi: discoveryApiRef,
95
- oauthRequestApi: oauthRequestApiRef,
96
- configApi: configApiRef
97
- },
98
- factory: ({ discoveryApi, oauthRequestApi, configApi }) => GoogleAuth.create({
99
- configApi,
100
- discoveryApi,
101
- oauthRequestApi,
102
- environment: configApi.getOptionalString("auth.environment")
103
- })
104
- }),
105
- createApiFactory({
106
- api: microsoftAuthApiRef,
107
- deps: {
108
- discoveryApi: discoveryApiRef,
109
- oauthRequestApi: oauthRequestApiRef,
110
- configApi: configApiRef
111
- },
112
- factory: ({ discoveryApi, oauthRequestApi, configApi }) => MicrosoftAuth.create({
113
- configApi,
114
- discoveryApi,
115
- oauthRequestApi,
116
- environment: configApi.getOptionalString("auth.environment")
117
- })
118
- }),
119
- createApiFactory({
120
- api: githubAuthApiRef,
121
- deps: {
122
- discoveryApi: discoveryApiRef,
123
- oauthRequestApi: oauthRequestApiRef,
124
- configApi: configApiRef
125
- },
126
- factory: ({ discoveryApi, oauthRequestApi, configApi }) => GithubAuth.create({
127
- configApi,
128
- discoveryApi,
129
- oauthRequestApi,
130
- defaultScopes: ["read:user"],
131
- environment: configApi.getOptionalString("auth.environment")
132
- })
133
- }),
134
- createApiFactory({
135
- api: oktaAuthApiRef,
136
- deps: {
137
- discoveryApi: discoveryApiRef,
138
- oauthRequestApi: oauthRequestApiRef,
139
- configApi: configApiRef
140
- },
141
- factory: ({ discoveryApi, oauthRequestApi, configApi }) => OktaAuth.create({
142
- configApi,
143
- discoveryApi,
144
- oauthRequestApi,
145
- environment: configApi.getOptionalString("auth.environment")
146
- })
147
- }),
148
- createApiFactory({
149
- api: gitlabAuthApiRef,
150
- deps: {
151
- discoveryApi: discoveryApiRef,
152
- oauthRequestApi: oauthRequestApiRef,
153
- configApi: configApiRef
154
- },
155
- factory: ({ discoveryApi, oauthRequestApi, configApi }) => GitlabAuth.create({
156
- configApi,
157
- discoveryApi,
158
- oauthRequestApi,
159
- environment: configApi.getOptionalString("auth.environment")
160
- })
161
- }),
162
- createApiFactory({
163
- api: oneloginAuthApiRef,
164
- deps: {
165
- discoveryApi: discoveryApiRef,
166
- oauthRequestApi: oauthRequestApiRef,
167
- configApi: configApiRef
168
- },
169
- factory: ({ discoveryApi, oauthRequestApi, configApi }) => OneLoginAuth.create({
170
- configApi,
171
- discoveryApi,
172
- oauthRequestApi,
173
- environment: configApi.getOptionalString("auth.environment")
174
- })
175
- }),
176
- createApiFactory({
177
- api: bitbucketAuthApiRef,
178
- deps: {
179
- discoveryApi: discoveryApiRef,
180
- oauthRequestApi: oauthRequestApiRef,
181
- configApi: configApiRef
182
- },
183
- factory: ({ discoveryApi, oauthRequestApi, configApi }) => BitbucketAuth.create({
184
- configApi,
185
- discoveryApi,
186
- oauthRequestApi,
187
- defaultScopes: ["account"],
188
- environment: configApi.getOptionalString("auth.environment")
189
- })
190
- }),
191
- createApiFactory({
192
- api: bitbucketServerAuthApiRef,
193
- deps: {
194
- discoveryApi: discoveryApiRef,
195
- oauthRequestApi: oauthRequestApiRef,
196
- configApi: configApiRef
197
- },
198
- factory: ({ discoveryApi, oauthRequestApi, configApi }) => BitbucketServerAuth.create({
199
- configApi,
200
- discoveryApi,
201
- oauthRequestApi,
202
- defaultScopes: ["REPO_READ"]
203
- })
204
- }),
205
- createApiFactory({
206
- api: atlassianAuthApiRef,
207
- deps: {
208
- discoveryApi: discoveryApiRef,
209
- oauthRequestApi: oauthRequestApiRef,
210
- configApi: configApiRef
211
- },
212
- factory: ({ discoveryApi, oauthRequestApi, configApi }) => {
213
- return AtlassianAuth.create({
214
- configApi,
215
- discoveryApi,
216
- oauthRequestApi,
217
- environment: configApi.getOptionalString("auth.environment")
218
- });
219
- }
220
- }),
221
- createApiFactory({
222
- api: vmwareCloudAuthApiRef,
223
- deps: {
224
- discoveryApi: discoveryApiRef,
225
- oauthRequestApi: oauthRequestApiRef,
226
- configApi: configApiRef
227
- },
228
- factory: ({ discoveryApi, oauthRequestApi, configApi }) => {
229
- return VMwareCloudAuth.create({
230
- configApi,
231
- discoveryApi,
232
- oauthRequestApi,
233
- environment: configApi.getOptionalString("auth.environment")
234
- });
235
- }
236
- }),
237
- createApiFactory({
238
- api: permissionApiRef,
239
- deps: {
240
- discovery: discoveryApiRef,
241
- identity: identityApiRef,
242
- config: configApiRef
243
- },
244
- factory: ({ config, discovery, identity }) => IdentityPermissionApi.create({ config, discovery, identity })
245
- })
246
- ];
247
-
248
- function OptionallyWrapInRouter({ children }) {
249
- if (useInRouterContext()) {
250
- return /* @__PURE__ */ React.createElement(React.Fragment, null, children);
251
- }
252
- return /* @__PURE__ */ React.createElement(MemoryRouter, null, children);
253
- }
254
- const DefaultNotFoundPage = () => /* @__PURE__ */ React.createElement(ErrorPage, { status: "404", statusMessage: "PAGE NOT FOUND" });
255
- const DefaultBootErrorPage = ({ step, error }) => {
256
- let message = "";
257
- if (step === "load-config") {
258
- message = `The configuration failed to load, someone should have a look at this error: ${error.message}`;
259
- } else if (step === "load-chunk") {
260
- message = `Lazy loaded chunk failed to load, try to reload the page: ${error.message}`;
261
- }
262
- return /* @__PURE__ */ React.createElement(OptionallyWrapInRouter, null, /* @__PURE__ */ React.createElement(ErrorPage, { statusMessage: message, stack: error.stack }));
263
- };
264
- const DefaultErrorBoundaryFallback = ({
265
- error,
266
- resetError,
267
- plugin
268
- }) => {
269
- return /* @__PURE__ */ React.createElement(
270
- ErrorPanel,
271
- {
272
- title: `Error in ${plugin == null ? void 0 : plugin.getId()}`,
273
- defaultExpanded: true,
274
- error
275
- },
276
- /* @__PURE__ */ React.createElement(Button, { variant: "outlined", onClick: resetError }, "Retry")
277
- );
278
- };
279
- const components = {
280
- Progress,
281
- Router: BrowserRouter,
282
- NotFoundErrorPage: DefaultNotFoundPage,
283
- BootErrorPage: DefaultBootErrorPage,
284
- ErrorBoundaryFallback: DefaultErrorBoundaryFallback
285
- };
286
-
287
- const icons = {
288
- brokenImage: MuiBrokenImageIcon,
289
- // To be confirmed: see https://github.com/backstage/backstage/issues/4970
290
- catalog: MuiMenuBookIcon,
291
- scaffolder: MuiCreateNewFolderIcon,
292
- techdocs: MuiSubjectIcon,
293
- search: MuiSearchIcon,
294
- chat: MuiChatIcon,
295
- dashboard: MuiDashboardIcon,
296
- docs: MuiDocsIcon,
297
- email: MuiEmailIcon,
298
- github: MuiGitHubIcon,
299
- group: MuiPeopleIcon,
300
- help: MuiHelpIcon,
301
- "kind:api": MuiExtensionIcon,
302
- "kind:component": MuiMemoryIcon,
303
- "kind:domain": MuiApartmentIcon,
304
- "kind:group": MuiPeopleIcon,
305
- "kind:location": MuiLocationOnIcon,
306
- "kind:system": MuiCategoryIcon,
307
- "kind:user": MuiPersonIcon,
308
- "kind:resource": MuiStorageIcon,
309
- "kind:template": MuiFeaturedPlayListIcon,
310
- user: MuiPersonIcon,
311
- warning: MuiWarningIcon
312
- };
313
-
314
- const themes = [
315
- {
316
- id: "light",
317
- title: "Light Theme",
318
- variant: "light",
319
- icon: /* @__PURE__ */ React.createElement(LightIcon, null),
320
- Provider: ({ children }) => /* @__PURE__ */ React.createElement(UnifiedThemeProvider, { theme: themes$1.light, children })
321
- },
322
- {
323
- id: "dark",
324
- title: "Dark Theme",
325
- variant: "dark",
326
- icon: /* @__PURE__ */ React.createElement(DarkIcon, null),
327
- Provider: ({ children }) => /* @__PURE__ */ React.createElement(UnifiedThemeProvider, { theme: themes$1.dark, children })
328
- }
329
- ];
330
-
331
- function createApp(options) {
332
- var _a, _b, _c, _d;
333
- return createSpecializedApp({
334
- ...options,
335
- apis: (_a = options == null ? void 0 : options.apis) != null ? _a : [],
336
- bindRoutes: options == null ? void 0 : options.bindRoutes,
337
- components: {
338
- ...components,
339
- ...options == null ? void 0 : options.components
340
- },
341
- configLoader: options == null ? void 0 : options.configLoader,
342
- defaultApis: apis,
343
- icons: {
344
- ...icons,
345
- ...options == null ? void 0 : options.icons
346
- },
347
- plugins: (_b = options == null ? void 0 : options.plugins) != null ? _b : [],
348
- featureFlags: (_c = options == null ? void 0 : options.featureFlags) != null ? _c : [],
349
- themes: (_d = options == null ? void 0 : options.themes) != null ? _d : themes
350
- });
351
- }
352
-
353
- export { createApp };
1
+ export { createApp } from './createApp.esm.js';
354
2
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../src/defaults/apis.ts","../src/defaults/components.tsx","../src/defaults/icons.tsx","../src/defaults/themes.tsx","../src/createApp.tsx"],"sourcesContent":["/*\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 VMwareCloudAuth,\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 vmwareCloudAuthApiRef,\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: ['account'],\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: vmwareCloudAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) => {\n return VMwareCloudAuth.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 statusMessage={message} stack={error.stack} />\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 MuiStorageIcon from '@material-ui/icons/Storage';\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': MuiStorageIcon as IconComponent,\n 'kind:template': MuiFeaturedPlayListIcon 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 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 { apis, components, icons, themes } from './defaults';\nimport {\n AppTheme,\n BackstagePlugin,\n IconComponent,\n} from '@backstage/core-plugin-api';\nimport {\n AppComponents,\n AppOptions,\n AppIcons,\n createSpecializedApp,\n} from '@backstage/core-app-api';\n\n/**\n * Creates a new Backstage App using a default set of components, icons and themes unless\n * they are explicitly provided.\n *\n * @public\n */\nexport function createApp(\n options?: Omit<AppOptions, keyof OptionalAppOptions> & OptionalAppOptions,\n) {\n return createSpecializedApp({\n ...options,\n apis: options?.apis ?? [],\n bindRoutes: options?.bindRoutes,\n components: {\n ...components,\n ...options?.components,\n },\n configLoader: options?.configLoader,\n defaultApis: apis,\n icons: {\n ...icons,\n ...options?.icons,\n },\n plugins: (options?.plugins as BackstagePlugin[]) ?? [],\n featureFlags: options?.featureFlags ?? [],\n themes: options?.themes ?? themes,\n });\n}\n\n/**\n * The set of app options that {@link createApp} will provide defaults for\n * if they are not passed in explicitly.\n *\n * @public\n */\nexport type OptionalAppOptions = {\n /**\n * A set of icons to override the default icons with.\n *\n * The override is applied for each icon individually.\n *\n * @public\n */\n icons?: Partial<AppIcons> & {\n [key in string]: IconComponent;\n };\n\n /**\n * A set of themes that override all of the default app themes.\n *\n * If this option is provided none of the default themes will be used.\n *\n * @public\n */\n themes?: (Partial<AppTheme> & Omit<AppTheme, 'theme'>)[]; // TODO: simplify once AppTheme is updated\n\n /**\n * A set of components to override the default components with.\n *\n * The override is applied for each icon individually.\n *\n * @public\n */\n components?: Partial<AppComponents>;\n};\n"],"names":["builtinThemes"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAAA,IACrB,UAAY,EAAA;AAAA,MACV,GAAG,UAAA;AAAA,MACH,GAAG,OAAS,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,OAAA,CAAA,UAAA;AAAA,KACd;AAAA,IACA,cAAc,OAAS,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,OAAA,CAAA,YAAA;AAAA,IACvB,WAAa,EAAA,IAAA;AAAA,IACb,KAAO,EAAA;AAAA,MACL,GAAG,KAAA;AAAA,MACH,GAAG,OAAS,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,OAAA,CAAA,KAAA;AAAA,KACd;AAAA,IACA,OAAU,EAAA,CAAA,EAAA,GAAA,OAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,OAAA,CAAS,OAAT,KAAA,IAAA,GAAA,EAAA,GAA0C,EAAC;AAAA,IACrD,YAAc,EAAA,CAAA,EAAA,GAAA,OAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,OAAA,CAAS,YAAT,KAAA,IAAA,GAAA,EAAA,GAAyB,EAAC;AAAA,IACxC,MAAA,EAAA,CAAQ,EAAS,GAAA,OAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,OAAA,CAAA,MAAA,KAAT,IAAmB,GAAA,EAAA,GAAA,MAAA;AAAA,GAC5B,CAAA,CAAA;AACH;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/app-defaults",
3
- "version": "1.5.4",
3
+ "version": "1.5.5-next.1",
4
4
  "description": "Provides the default wiring of a Backstage App",
5
5
  "backstage": {
6
6
  "role": "web-library"
@@ -37,16 +37,16 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@backstage/core-app-api": "^1.12.4",
40
- "@backstage/core-components": "^0.14.4",
40
+ "@backstage/core-components": "^0.14.6-next.1",
41
41
  "@backstage/core-plugin-api": "^1.9.2",
42
42
  "@backstage/plugin-permission-react": "^0.4.22",
43
- "@backstage/theme": "^0.5.3",
43
+ "@backstage/theme": "^0.5.4-next.0",
44
44
  "@material-ui/core": "^4.12.2",
45
45
  "@material-ui/icons": "^4.9.1"
46
46
  },
47
47
  "devDependencies": {
48
- "@backstage/cli": "^0.26.3",
49
- "@backstage/test-utils": "^1.5.4",
48
+ "@backstage/cli": "^0.26.5-next.0",
49
+ "@backstage/test-utils": "^1.5.5-next.0",
50
50
  "@testing-library/jest-dom": "^6.0.0",
51
51
  "@testing-library/react": "^15.0.0",
52
52
  "@types/react": "^16.13.1 || ^17.0.0"