@backstage/frontend-app-api 0.11.3-next.1 → 0.11.4-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @backstage/frontend-app-api
|
|
2
2
|
|
|
3
|
+
## 0.11.4-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/config@1.3.2
|
|
9
|
+
- @backstage/core-app-api@1.17.1
|
|
10
|
+
- @backstage/core-plugin-api@1.10.8
|
|
11
|
+
- @backstage/errors@1.2.7
|
|
12
|
+
- @backstage/frontend-defaults@0.2.4-next.0
|
|
13
|
+
- @backstage/frontend-plugin-api@0.10.4-next.0
|
|
14
|
+
- @backstage/types@1.2.1
|
|
15
|
+
- @backstage/version-bridge@1.0.11
|
|
16
|
+
|
|
17
|
+
## 0.11.3
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- 0169b23: Internal tweak to avoid circular dependencies
|
|
22
|
+
- c38c9e8: Implemented support for the `plugin.info()` method in specialized apps with a default resolved for `package.json` and `catalog-info.yaml`. The default resolution logic can be overridden via the `pluginInfoResolver` option to `createSpecializedApp`, and plugin-specific overrides can be applied via the new `app.pluginOverrides` key in static configuration.
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
- @backstage/core-plugin-api@1.10.8
|
|
25
|
+
- @backstage/frontend-plugin-api@0.10.3
|
|
26
|
+
- @backstage/frontend-defaults@0.2.3
|
|
27
|
+
- @backstage/config@1.3.2
|
|
28
|
+
- @backstage/core-app-api@1.17.1
|
|
29
|
+
- @backstage/errors@1.2.7
|
|
30
|
+
- @backstage/types@1.2.1
|
|
31
|
+
- @backstage/version-bridge@1.0.11
|
|
32
|
+
|
|
3
33
|
## 0.11.3-next.1
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collectRouteIds.esm.js","sources":["../../src/routing/collectRouteIds.ts"],"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 RouteRef,\n SubRouteRef,\n ExternalRouteRef,\n} from '@backstage/frontend-plugin-api';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport {\n isRouteRef,\n toInternalRouteRef,\n} from '../../../frontend-plugin-api/src/routing/RouteRef';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { toInternalExternalRouteRef } from '../../../frontend-plugin-api/src/routing/ExternalRouteRef';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { toInternalSubRouteRef } from '../../../frontend-plugin-api/src/routing/SubRouteRef';\nimport { OpaqueFrontendPlugin } from '@internal/frontend';\nimport { FrontendFeature } from '../wiring';\n\n/** @internal */\nexport interface RouteRefsById {\n routes: Map<string, RouteRef | SubRouteRef>;\n externalRoutes: Map<string, ExternalRouteRef>;\n}\n\n/** @internal */\nexport function collectRouteIds(features: FrontendFeature[]): RouteRefsById {\n const routesById = new Map<string, RouteRef | SubRouteRef>();\n const externalRoutesById = new Map<string, ExternalRouteRef>();\n\n for (const feature of features) {\n if (!OpaqueFrontendPlugin.isType(feature)) {\n continue;\n }\n\n for (const [name, ref] of Object.entries(feature.routes)) {\n const refId = `${feature.id}.${name}`;\n if (routesById.has(refId)) {\n throw new Error(`Unexpected duplicate route '${refId}'`);\n }\n\n if (isRouteRef(ref)) {\n const internalRef = toInternalRouteRef(ref);\n internalRef.setId(refId);\n routesById.set(refId, ref);\n } else {\n const internalRef = toInternalSubRouteRef(ref);\n routesById.set(refId, internalRef);\n }\n }\n for (const [name, ref] of Object.entries(feature.externalRoutes)) {\n const refId = `${feature.id}.${name}`;\n if (externalRoutesById.has(refId)) {\n throw new Error(`Unexpected duplicate external route '${refId}'`);\n }\n\n const internalRef = toInternalExternalRouteRef(ref);\n internalRef.setId(refId);\n externalRoutesById.set(refId, ref);\n }\n }\n\n return { routes: routesById, externalRoutes: externalRoutesById };\n}\n"],"names":[],"mappings":";;;;;;AAwCO,SAAS,gBAAgB,QAA4C,EAAA;AAC1E,EAAM,MAAA,UAAA,uBAAiB,GAAoC,EAAA;AAC3D,EAAM,MAAA,kBAAA,uBAAyB,GAA8B,EAAA;AAE7D,EAAA,KAAA,MAAW,WAAW,QAAU,EAAA;AAC9B,IAAA,IAAI,CAAC,oBAAA,CAAqB,MAAO,CAAA,OAAO,CAAG,EAAA;AACzC,MAAA;AAAA;AAGF,IAAW,KAAA,MAAA,CAAC,MAAM,GAAG,CAAA,IAAK,OAAO,OAAQ,CAAA,OAAA,CAAQ,MAAM,CAAG,EAAA;AACxD,MAAA,MAAM,KAAQ,GAAA,CAAA,EAAG,OAAQ,CAAA,EAAE,IAAI,IAAI,CAAA,CAAA;AACnC,MAAI,IAAA,UAAA,CAAW,GAAI,CAAA,KAAK,CAAG,EAAA;AACzB,QAAA,MAAM,IAAI,KAAA,CAAM,CAA+B,4BAAA,EAAA,KAAK,CAAG,CAAA,CAAA,CAAA;AAAA;AAGzD,MAAI,IAAA,UAAA,CAAW,GAAG,CAAG,EAAA;AACnB,QAAM,MAAA,WAAA,GAAc,mBAAmB,GAAG,CAAA;AAC1C,QAAA,WAAA,CAAY,MAAM,KAAK,CAAA;AACvB,QAAW,UAAA,CAAA,GAAA,CAAI,OAAO,GAAG,CAAA;AAAA,OACpB,MAAA;AACL,QAAM,MAAA,WAAA,GAAc,sBAAsB,GAAG,CAAA;AAC7C,QAAW,UAAA,CAAA,GAAA,CAAI,OAAO,WAAW,CAAA;AAAA;AACnC;AAEF,IAAW,KAAA,MAAA,CAAC,MAAM,GAAG,CAAA,IAAK,OAAO,OAAQ,CAAA,OAAA,CAAQ,cAAc,CAAG,EAAA;AAChE,MAAA,MAAM,KAAQ,GAAA,CAAA,EAAG,OAAQ,CAAA,EAAE,IAAI,IAAI,CAAA,CAAA;AACnC,MAAI,IAAA,kBAAA,CAAmB,GAAI,CAAA,KAAK,CAAG,EAAA;AACjC,QAAA,MAAM,IAAI,KAAA,CAAM,CAAwC,qCAAA,EAAA,KAAK,CAAG,CAAA,CAAA,CAAA;AAAA;AAGlE,MAAM,MAAA,WAAA,GAAc,2BAA2B,GAAG,CAAA;AAClD,MAAA,WAAA,CAAY,MAAM,KAAK,CAAA;AACvB,MAAmB,kBAAA,CAAA,GAAA,CAAI,OAAO,GAAG,CAAA;AAAA;AACnC;AAGF,EAAA,OAAO,EAAE,MAAA,EAAQ,UAAY,EAAA,cAAA,EAAgB,kBAAmB,EAAA;AAClE;;;;"}
|
|
1
|
+
{"version":3,"file":"collectRouteIds.esm.js","sources":["../../src/routing/collectRouteIds.ts"],"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 RouteRef,\n SubRouteRef,\n ExternalRouteRef,\n} from '@backstage/frontend-plugin-api';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport {\n isRouteRef,\n toInternalRouteRef,\n} from '../../../frontend-plugin-api/src/routing/RouteRef';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { toInternalExternalRouteRef } from '../../../frontend-plugin-api/src/routing/ExternalRouteRef';\n// eslint-disable-next-line @backstage/no-relative-monorepo-imports\nimport { toInternalSubRouteRef } from '../../../frontend-plugin-api/src/routing/SubRouteRef';\nimport { OpaqueFrontendPlugin } from '@internal/frontend';\nimport { FrontendFeature } from '../wiring/types';\n\n/** @internal */\nexport interface RouteRefsById {\n routes: Map<string, RouteRef | SubRouteRef>;\n externalRoutes: Map<string, ExternalRouteRef>;\n}\n\n/** @internal */\nexport function collectRouteIds(features: FrontendFeature[]): RouteRefsById {\n const routesById = new Map<string, RouteRef | SubRouteRef>();\n const externalRoutesById = new Map<string, ExternalRouteRef>();\n\n for (const feature of features) {\n if (!OpaqueFrontendPlugin.isType(feature)) {\n continue;\n }\n\n for (const [name, ref] of Object.entries(feature.routes)) {\n const refId = `${feature.id}.${name}`;\n if (routesById.has(refId)) {\n throw new Error(`Unexpected duplicate route '${refId}'`);\n }\n\n if (isRouteRef(ref)) {\n const internalRef = toInternalRouteRef(ref);\n internalRef.setId(refId);\n routesById.set(refId, ref);\n } else {\n const internalRef = toInternalSubRouteRef(ref);\n routesById.set(refId, internalRef);\n }\n }\n for (const [name, ref] of Object.entries(feature.externalRoutes)) {\n const refId = `${feature.id}.${name}`;\n if (externalRoutesById.has(refId)) {\n throw new Error(`Unexpected duplicate external route '${refId}'`);\n }\n\n const internalRef = toInternalExternalRouteRef(ref);\n internalRef.setId(refId);\n externalRoutesById.set(refId, ref);\n }\n }\n\n return { routes: routesById, externalRoutes: externalRoutesById };\n}\n"],"names":[],"mappings":";;;;;;AAwCO,SAAS,gBAAgB,QAA4C,EAAA;AAC1E,EAAM,MAAA,UAAA,uBAAiB,GAAoC,EAAA;AAC3D,EAAM,MAAA,kBAAA,uBAAyB,GAA8B,EAAA;AAE7D,EAAA,KAAA,MAAW,WAAW,QAAU,EAAA;AAC9B,IAAA,IAAI,CAAC,oBAAA,CAAqB,MAAO,CAAA,OAAO,CAAG,EAAA;AACzC,MAAA;AAAA;AAG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AAA,EAAgB,kBAAmB,EAAA;AAClE;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/frontend-app-api",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.4-next.0",
|
|
4
4
|
"backstage": {
|
|
5
5
|
"role": "web-library"
|
|
6
6
|
},
|
|
@@ -33,20 +33,20 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@backstage/config": "1.3.2",
|
|
36
|
-
"@backstage/core-app-api": "1.17.
|
|
37
|
-
"@backstage/core-plugin-api": "1.10.
|
|
36
|
+
"@backstage/core-app-api": "1.17.1",
|
|
37
|
+
"@backstage/core-plugin-api": "1.10.8",
|
|
38
38
|
"@backstage/errors": "1.2.7",
|
|
39
|
-
"@backstage/frontend-defaults": "0.2.
|
|
40
|
-
"@backstage/frontend-plugin-api": "0.10.
|
|
39
|
+
"@backstage/frontend-defaults": "0.2.4-next.0",
|
|
40
|
+
"@backstage/frontend-plugin-api": "0.10.4-next.0",
|
|
41
41
|
"@backstage/types": "1.2.1",
|
|
42
42
|
"@backstage/version-bridge": "1.0.11",
|
|
43
43
|
"lodash": "^4.17.21",
|
|
44
44
|
"zod": "^3.22.4"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@backstage/cli": "0.33.
|
|
48
|
-
"@backstage/plugin-app": "0.1.
|
|
49
|
-
"@backstage/test-utils": "1.7.
|
|
47
|
+
"@backstage/cli": "0.33.1-next.0",
|
|
48
|
+
"@backstage/plugin-app": "0.1.11-next.0",
|
|
49
|
+
"@backstage/test-utils": "1.7.10-next.0",
|
|
50
50
|
"@testing-library/jest-dom": "^6.0.0",
|
|
51
51
|
"@testing-library/react": "^16.0.0",
|
|
52
52
|
"@types/react": "^18.0.0",
|