@backstage/frontend-plugin-api 0.9.1-next.2 → 0.9.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 +10 -0
- package/dist/blueprints/PageBlueprint.esm.js +1 -0
- package/dist/blueprints/PageBlueprint.esm.js.map +1 -1
- package/dist/blueprints/SignInPageBlueprint.esm.js +1 -0
- package/dist/blueprints/SignInPageBlueprint.esm.js.map +1 -1
- package/dist/components/ExtensionBoundary.esm.js +1 -1
- package/dist/components/coreComponentRefs.esm.js +1 -2
- package/dist/components/coreComponentRefs.esm.js.map +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @backstage/frontend-plugin-api
|
|
2
2
|
|
|
3
|
+
## 0.9.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/types@1.2.0
|
|
9
|
+
- @backstage/core-components@0.16.0
|
|
10
|
+
- @backstage/core-plugin-api@1.10.1
|
|
11
|
+
- @backstage/version-bridge@1.0.10
|
|
12
|
+
|
|
3
13
|
## 0.9.1-next.2
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -3,6 +3,7 @@ import 'zod';
|
|
|
3
3
|
import 'zod-to-json-schema';
|
|
4
4
|
import { createExtensionBlueprint } from '../wiring/createExtensionBlueprint.esm.js';
|
|
5
5
|
import { ExtensionBoundary } from '../components/ExtensionBoundary.esm.js';
|
|
6
|
+
import '../components/coreComponentRefs.esm.js';
|
|
6
7
|
|
|
7
8
|
const PageBlueprint = createExtensionBlueprint({
|
|
8
9
|
kind: "page",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageBlueprint.esm.js","sources":["../../src/blueprints/PageBlueprint.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 '../routing';\nimport { coreExtensionData, createExtensionBlueprint } from '../wiring';\nimport { ExtensionBoundary } from '../components';\n\n/**\n * Createx extensions that are routable React page components.\n *\n * @public\n */\nexport const PageBlueprint = createExtensionBlueprint({\n kind: 'page',\n attachTo: { id: 'app/routes', input: 'routes' },\n output: [\n coreExtensionData.routePath,\n coreExtensionData.reactElement,\n coreExtensionData.routeRef.optional(),\n ],\n config: {\n schema: {\n path: z => z.string().optional(),\n },\n },\n *factory(\n {\n defaultPath,\n loader,\n routeRef,\n }: {\n defaultPath: string;\n loader: () => Promise<JSX.Element>;\n routeRef?: RouteRef;\n },\n { config, node },\n ) {\n yield coreExtensionData.routePath(config.path ?? defaultPath);\n yield coreExtensionData.reactElement(ExtensionBoundary.lazy(node, loader));\n if (routeRef) {\n yield coreExtensionData.routeRef(routeRef);\n }\n },\n});\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PageBlueprint.esm.js","sources":["../../src/blueprints/PageBlueprint.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 '../routing';\nimport { coreExtensionData, createExtensionBlueprint } from '../wiring';\nimport { ExtensionBoundary } from '../components';\n\n/**\n * Createx extensions that are routable React page components.\n *\n * @public\n */\nexport const PageBlueprint = createExtensionBlueprint({\n kind: 'page',\n attachTo: { id: 'app/routes', input: 'routes' },\n output: [\n coreExtensionData.routePath,\n coreExtensionData.reactElement,\n coreExtensionData.routeRef.optional(),\n ],\n config: {\n schema: {\n path: z => z.string().optional(),\n },\n },\n *factory(\n {\n defaultPath,\n loader,\n routeRef,\n }: {\n defaultPath: string;\n loader: () => Promise<JSX.Element>;\n routeRef?: RouteRef;\n },\n { config, node },\n ) {\n yield coreExtensionData.routePath(config.path ?? defaultPath);\n yield coreExtensionData.reactElement(ExtensionBoundary.lazy(node, loader));\n if (routeRef) {\n yield coreExtensionData.routeRef(routeRef);\n }\n },\n});\n"],"names":[],"mappings":";;;;;;;AAyBO,MAAM,gBAAgB,wBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,MAAA;AAAA,EACN,QAAU,EAAA,EAAE,EAAI,EAAA,YAAA,EAAc,OAAO,QAAS,EAAA;AAAA,EAC9C,MAAQ,EAAA;AAAA,IACN,iBAAkB,CAAA,SAAA;AAAA,IAClB,iBAAkB,CAAA,YAAA;AAAA,IAClB,iBAAA,CAAkB,SAAS,QAAS;AAAA,GACtC;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,MAAQ,EAAA;AAAA,MACN,IAAM,EAAA,CAAA,CAAA,KAAK,CAAE,CAAA,MAAA,GAAS,QAAS;AAAA;AACjC,GACF;AAAA,EACA,CAAC,OACC,CAAA;AAAA,IACE,WAAA;AAAA,IACA,MAAA;AAAA,IACA;AAAA,GAMF,EAAA,EAAE,MAAQ,EAAA,IAAA,EACV,EAAA;AACA,IAAA,MAAM,iBAAkB,CAAA,SAAA,CAAU,MAAO,CAAA,IAAA,IAAQ,WAAW,CAAA;AAC5D,IAAA,MAAM,kBAAkB,YAAa,CAAA,iBAAA,CAAkB,IAAK,CAAA,IAAA,EAAM,MAAM,CAAC,CAAA;AACzE,IAAA,IAAI,QAAU,EAAA;AACZ,MAAM,MAAA,iBAAA,CAAkB,SAAS,QAAQ,CAAA;AAAA;AAC3C;AAEJ,CAAC;;;;"}
|
|
@@ -5,6 +5,7 @@ import 'zod-to-json-schema';
|
|
|
5
5
|
import { createExtensionDataRef } from '../wiring/createExtensionDataRef.esm.js';
|
|
6
6
|
import { createExtensionBlueprint } from '../wiring/createExtensionBlueprint.esm.js';
|
|
7
7
|
import { ExtensionBoundary } from '../components/ExtensionBoundary.esm.js';
|
|
8
|
+
import '../components/coreComponentRefs.esm.js';
|
|
8
9
|
|
|
9
10
|
const componentDataRef = createExtensionDataRef().with({ id: "core.sign-in-page.component" });
|
|
10
11
|
const SignInPageBlueprint = createExtensionBlueprint({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignInPageBlueprint.esm.js","sources":["../../src/blueprints/SignInPageBlueprint.tsx"],"sourcesContent":["/*\n * Copyright 2024 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, { ComponentType, lazy } from 'react';\nimport { createExtensionBlueprint, createExtensionDataRef } from '../wiring';\nimport { SignInPageProps } from '@backstage/core-plugin-api';\nimport { ExtensionBoundary } from '../components';\n\nconst componentDataRef = createExtensionDataRef<\n ComponentType<SignInPageProps>\n>().with({ id: 'core.sign-in-page.component' });\n\n/**\n * Creates an extension that replaces the sign in page.\n *\n * @public\n */\nexport const SignInPageBlueprint = createExtensionBlueprint({\n kind: 'sign-in-page',\n attachTo: { id: 'app/root', input: 'signInPage' },\n output: [componentDataRef],\n dataRefs: {\n component: componentDataRef,\n },\n *factory(\n {\n loader,\n }: {\n loader: () => Promise<ComponentType<SignInPageProps>>;\n },\n { node },\n ) {\n const ExtensionComponent = lazy(() =>\n loader().then(component => ({ default: component })),\n );\n\n yield componentDataRef(props => (\n <ExtensionBoundary node={node} routable>\n <ExtensionComponent {...props} />\n </ExtensionBoundary>\n ));\n },\n});\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SignInPageBlueprint.esm.js","sources":["../../src/blueprints/SignInPageBlueprint.tsx"],"sourcesContent":["/*\n * Copyright 2024 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, { ComponentType, lazy } from 'react';\nimport { createExtensionBlueprint, createExtensionDataRef } from '../wiring';\nimport { SignInPageProps } from '@backstage/core-plugin-api';\nimport { ExtensionBoundary } from '../components';\n\nconst componentDataRef = createExtensionDataRef<\n ComponentType<SignInPageProps>\n>().with({ id: 'core.sign-in-page.component' });\n\n/**\n * Creates an extension that replaces the sign in page.\n *\n * @public\n */\nexport const SignInPageBlueprint = createExtensionBlueprint({\n kind: 'sign-in-page',\n attachTo: { id: 'app/root', input: 'signInPage' },\n output: [componentDataRef],\n dataRefs: {\n component: componentDataRef,\n },\n *factory(\n {\n loader,\n }: {\n loader: () => Promise<ComponentType<SignInPageProps>>;\n },\n { node },\n ) {\n const ExtensionComponent = lazy(() =>\n loader().then(component => ({ default: component })),\n );\n\n yield componentDataRef(props => (\n <ExtensionBoundary node={node} routable>\n <ExtensionComponent {...props} />\n </ExtensionBoundary>\n ));\n },\n});\n"],"names":[],"mappings":";;;;;;;;;AAqBA,MAAM,mBAAmB,sBAEvB,EAAA,CAAE,KAAK,EAAE,EAAA,EAAI,+BAA+B,CAAA;AAOvC,MAAM,sBAAsB,wBAAyB,CAAA;AAAA,EAC1D,IAAM,EAAA,cAAA;AAAA,EACN,QAAU,EAAA,EAAE,EAAI,EAAA,UAAA,EAAY,OAAO,YAAa,EAAA;AAAA,EAChD,MAAA,EAAQ,CAAC,gBAAgB,CAAA;AAAA,EACzB,QAAU,EAAA;AAAA,IACR,SAAW,EAAA;AAAA,GACb;AAAA,EACA,CAAC,OACC,CAAA;AAAA,IACE;AAAA,GACF,EAGA,EAAE,IAAA,EACF,EAAA;AACA,IAAA,MAAM,kBAAqB,GAAA,IAAA;AAAA,MAAK,MAC9B,QAAS,CAAA,IAAA,CAAK,gBAAc,EAAE,OAAA,EAAS,WAAY,CAAA;AAAA,KACrD;AAEA,IAAA,MAAM,gBAAiB,CAAA,CAAA,KAAA,qBACpB,KAAA,CAAA,aAAA,CAAA,iBAAA,EAAA,EAAkB,IAAY,EAAA,QAAA,EAAQ,IACrC,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,kBAAoB,EAAA,EAAA,GAAG,KAAO,EAAA,CACjC,CACD,CAAA;AAAA;AAEL,CAAC;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { lazy, Suspense, useEffect } from 'react';
|
|
2
2
|
import { AnalyticsContext, useAnalytics } from '@backstage/core-plugin-api';
|
|
3
3
|
import { ErrorBoundary } from './ErrorBoundary.esm.js';
|
|
4
4
|
import { routableExtensionRenderedEvent } from '../core-plugin-api/src/analytics/Tracker.esm.js';
|
|
@@ -3,7 +3,7 @@ import { createComponentRef } from './createComponentRef.esm.js';
|
|
|
3
3
|
const coreProgressComponentRef = createComponentRef({
|
|
4
4
|
id: "core.components.progress"
|
|
5
5
|
});
|
|
6
|
-
|
|
6
|
+
createComponentRef({
|
|
7
7
|
id: "core.components.notFoundErrorPage"
|
|
8
8
|
});
|
|
9
9
|
const coreErrorBoundaryFallbackComponentRef = createComponentRef({
|
|
@@ -11,7 +11,6 @@ const coreErrorBoundaryFallbackComponentRef = createComponentRef({
|
|
|
11
11
|
});
|
|
12
12
|
const coreComponentRefs = {
|
|
13
13
|
progress: coreProgressComponentRef,
|
|
14
|
-
notFoundErrorPage: coreNotFoundErrorPageComponentRef,
|
|
15
14
|
errorBoundaryFallback: coreErrorBoundaryFallbackComponentRef
|
|
16
15
|
};
|
|
17
16
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coreComponentRefs.esm.js","sources":["../../src/components/coreComponentRefs.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 CoreErrorBoundaryFallbackProps,\n CoreNotFoundErrorPageProps,\n CoreProgressProps,\n} from '../types';\nimport { createComponentRef } from './createComponentRef';\n\nconst coreProgressComponentRef = createComponentRef<CoreProgressProps>({\n id: 'core.components.progress',\n});\n\nconst coreNotFoundErrorPageComponentRef =\n createComponentRef<CoreNotFoundErrorPageProps>({\n id: 'core.components.notFoundErrorPage',\n });\n\nconst coreErrorBoundaryFallbackComponentRef =\n createComponentRef<CoreErrorBoundaryFallbackProps>({\n id: 'core.components.errorBoundaryFallback',\n });\n\n/** @public */\nexport const coreComponentRefs = {\n progress: coreProgressComponentRef,\n notFoundErrorPage: coreNotFoundErrorPageComponentRef,\n errorBoundaryFallback: coreErrorBoundaryFallbackComponentRef,\n};\n"],"names":[],"mappings":";;AAuBA,MAAM,2BAA2B,kBAAsC,CAAA;AAAA,EACrE,EAAI,EAAA;AACN,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"coreComponentRefs.esm.js","sources":["../../src/components/coreComponentRefs.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 CoreErrorBoundaryFallbackProps,\n CoreNotFoundErrorPageProps,\n CoreProgressProps,\n} from '../types';\nimport { createComponentRef } from './createComponentRef';\n\nconst coreProgressComponentRef = createComponentRef<CoreProgressProps>({\n id: 'core.components.progress',\n});\n\nconst coreNotFoundErrorPageComponentRef =\n createComponentRef<CoreNotFoundErrorPageProps>({\n id: 'core.components.notFoundErrorPage',\n });\n\nconst coreErrorBoundaryFallbackComponentRef =\n createComponentRef<CoreErrorBoundaryFallbackProps>({\n id: 'core.components.errorBoundaryFallback',\n });\n\n/** @public */\nexport const coreComponentRefs = {\n progress: coreProgressComponentRef,\n notFoundErrorPage: coreNotFoundErrorPageComponentRef,\n errorBoundaryFallback: coreErrorBoundaryFallbackComponentRef,\n};\n"],"names":[],"mappings":";;AAuBA,MAAM,2BAA2B,kBAAsC,CAAA;AAAA,EACrE,EAAI,EAAA;AACN,CAAC,CAAA;AAGC,kBAA+C,CAAA;AAAA,EAC7C,EAAI,EAAA;AACN,CAAC;AAEH,MAAM,wCACJ,kBAAmD,CAAA;AAAA,EACjD,EAAI,EAAA;AACN,CAAC,CAAA;AAGI,MAAM,iBAAoB,GAAA;AAAA,EAC/B,QAAU,EAAA,wBAAA;AAAA,EAEV,qBAAuB,EAAA;AACzB;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/frontend-plugin-api",
|
|
3
|
-
"version": "0.9.1
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"backstage": {
|
|
5
5
|
"role": "web-library"
|
|
6
6
|
},
|
|
@@ -31,20 +31,20 @@
|
|
|
31
31
|
"test": "backstage-cli package test"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@backstage/core-components": "0.16.0
|
|
35
|
-
"@backstage/core-plugin-api": "1.10.
|
|
36
|
-
"@backstage/types": "1.
|
|
37
|
-
"@backstage/version-bridge": "1.0.10",
|
|
34
|
+
"@backstage/core-components": "^0.16.0",
|
|
35
|
+
"@backstage/core-plugin-api": "^1.10.1",
|
|
36
|
+
"@backstage/types": "^1.2.0",
|
|
37
|
+
"@backstage/version-bridge": "^1.0.10",
|
|
38
38
|
"@material-ui/core": "^4.12.4",
|
|
39
39
|
"lodash": "^4.17.21",
|
|
40
40
|
"zod": "^3.22.4",
|
|
41
41
|
"zod-to-json-schema": "^3.21.4"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@backstage/cli": "0.29.0
|
|
45
|
-
"@backstage/frontend-app-api": "0.10.1
|
|
46
|
-
"@backstage/frontend-test-utils": "0.2.2
|
|
47
|
-
"@backstage/test-utils": "1.7.1
|
|
44
|
+
"@backstage/cli": "^0.29.0",
|
|
45
|
+
"@backstage/frontend-app-api": "^0.10.1",
|
|
46
|
+
"@backstage/frontend-test-utils": "^0.2.2",
|
|
47
|
+
"@backstage/test-utils": "^1.7.1",
|
|
48
48
|
"@testing-library/jest-dom": "^6.0.0",
|
|
49
49
|
"@testing-library/react": "^16.0.0",
|
|
50
50
|
"@types/react": "^18.0.0",
|