@backstage/plugin-devtools-react 0.0.0-nightly-20260127025640
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 +20 -0
- package/README.md +5 -0
- package/dist/devToolsContentBlueprint.esm.js +33 -0
- package/dist/devToolsContentBlueprint.esm.js.map +1 -0
- package/dist/index.d.ts +54 -0
- package/dist/index.esm.js +2 -0
- package/dist/index.esm.js.map +1 -0
- package/package.json +75 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# @backstage/plugin-devtools-react
|
|
2
|
+
|
|
3
|
+
## 0.0.0-nightly-20260127025640
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/frontend-plugin-api@0.0.0-nightly-20260127025640
|
|
9
|
+
- @backstage/core-plugin-api@0.0.0-nightly-20260127025640
|
|
10
|
+
|
|
11
|
+
## 0.1.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- be6cef5: Add support for adding `unprocessed-entities` and other tabs to `devtools` when using the New Frontend system
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
- @backstage/frontend-plugin-api@0.13.3
|
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { createExtensionBlueprint, coreExtensionData, ExtensionBoundary } from '@backstage/frontend-plugin-api';
|
|
2
|
+
|
|
3
|
+
const DevToolsContentBlueprint = createExtensionBlueprint({
|
|
4
|
+
kind: "devtools-content",
|
|
5
|
+
attachTo: { id: "page:devtools", input: "contents" },
|
|
6
|
+
output: [
|
|
7
|
+
coreExtensionData.reactElement,
|
|
8
|
+
coreExtensionData.routePath,
|
|
9
|
+
coreExtensionData.routeRef.optional(),
|
|
10
|
+
coreExtensionData.title
|
|
11
|
+
],
|
|
12
|
+
config: {
|
|
13
|
+
schema: {
|
|
14
|
+
path: (z) => z.string().optional(),
|
|
15
|
+
title: (z) => z.string().optional()
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
*factory(params, { node, config }) {
|
|
19
|
+
const path = config.path ?? params.path;
|
|
20
|
+
const title = config.title ?? params.title;
|
|
21
|
+
yield coreExtensionData.reactElement(
|
|
22
|
+
ExtensionBoundary.lazy(node, params.loader)
|
|
23
|
+
);
|
|
24
|
+
yield coreExtensionData.routePath(path);
|
|
25
|
+
yield coreExtensionData.title(title);
|
|
26
|
+
if (params.routeRef) {
|
|
27
|
+
yield coreExtensionData.routeRef(params.routeRef);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export { DevToolsContentBlueprint };
|
|
33
|
+
//# sourceMappingURL=devToolsContentBlueprint.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devToolsContentBlueprint.esm.js","sources":["../src/devToolsContentBlueprint.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 {\n coreExtensionData,\n createExtensionBlueprint,\n ExtensionBoundary,\n RouteRef,\n} from '@backstage/frontend-plugin-api';\nimport { JSX } from 'react';\n\n/**\n * Parameters for creating a DevTools route extension\n * @public\n */\nexport interface DevToolsContentBlueprintParams {\n path: string;\n title: string;\n loader: () => Promise<JSX.Element>;\n routeRef?: RouteRef;\n}\n\n/**\n * Extension blueprint for creating DevTools content pages (appearing as tabs)\n *\n * @example\n * ```tsx\n * const myDevToolsContent = DevToolsContentBlueprint.make({\n * {\n * params: {\n * path: 'my-dev-tools',\n * title: 'My DevTools',\n * loader: () =>\n * import('../components/MyDevTools').then(m =>\n * compatWrapper(<m.MyDevTools />),\n * ),\n * },\n * },\n * });\n * ```\n * @public\n */\nexport const DevToolsContentBlueprint = createExtensionBlueprint({\n kind: 'devtools-content',\n attachTo: { id: 'page:devtools', input: 'contents' },\n output: [\n coreExtensionData.reactElement,\n coreExtensionData.routePath,\n coreExtensionData.routeRef.optional(),\n coreExtensionData.title,\n ],\n config: {\n schema: {\n path: z => z.string().optional(),\n title: z => z.string().optional(),\n },\n },\n *factory(params: DevToolsContentBlueprintParams, { node, config }) {\n const path = config.path ?? params.path;\n const title = config.title ?? params.title;\n\n yield coreExtensionData.reactElement(\n ExtensionBoundary.lazy(node, params.loader),\n );\n\n yield coreExtensionData.routePath(path);\n\n yield coreExtensionData.title(title);\n\n if (params.routeRef) {\n yield coreExtensionData.routeRef(params.routeRef);\n }\n },\n});\n"],"names":[],"mappings":";;AAuDO,MAAM,2BAA2B,wBAAA,CAAyB;AAAA,EAC/D,IAAA,EAAM,kBAAA;AAAA,EACN,QAAA,EAAU,EAAE,EAAA,EAAI,eAAA,EAAiB,OAAO,UAAA,EAAW;AAAA,EACnD,MAAA,EAAQ;AAAA,IACN,iBAAA,CAAkB,YAAA;AAAA,IAClB,iBAAA,CAAkB,SAAA;AAAA,IAClB,iBAAA,CAAkB,SAAS,QAAA,EAAS;AAAA,IACpC,iBAAA,CAAkB;AAAA,GACpB;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,MAAA,EAAQ;AAAA,MACN,IAAA,EAAM,CAAA,CAAA,KAAK,CAAA,CAAE,MAAA,GAAS,QAAA,EAAS;AAAA,MAC/B,KAAA,EAAO,CAAA,CAAA,KAAK,CAAA,CAAE,MAAA,GAAS,QAAA;AAAS;AAClC,GACF;AAAA,EACA,CAAC,OAAA,CAAQ,MAAA,EAAwC,EAAE,IAAA,EAAM,QAAO,EAAG;AACjE,IAAA,MAAM,IAAA,GAAO,MAAA,CAAO,IAAA,IAAQ,MAAA,CAAO,IAAA;AACnC,IAAA,MAAM,KAAA,GAAQ,MAAA,CAAO,KAAA,IAAS,MAAA,CAAO,KAAA;AAErC,IAAA,MAAM,iBAAA,CAAkB,YAAA;AAAA,MACtB,iBAAA,CAAkB,IAAA,CAAK,IAAA,EAAM,MAAA,CAAO,MAAM;AAAA,KAC5C;AAEA,IAAA,MAAM,iBAAA,CAAkB,UAAU,IAAI,CAAA;AAEtC,IAAA,MAAM,iBAAA,CAAkB,MAAM,KAAK,CAAA;AAEnC,IAAA,IAAI,OAAO,QAAA,EAAU;AACnB,MAAA,MAAM,iBAAA,CAAkB,QAAA,CAAS,MAAA,CAAO,QAAQ,CAAA;AAAA,IAClD;AAAA,EACF;AACF,CAAC;;;;"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
|
|
2
|
+
import { RouteRef } from '@backstage/frontend-plugin-api';
|
|
3
|
+
import { JSX } from 'react';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Parameters for creating a DevTools route extension
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
interface DevToolsContentBlueprintParams {
|
|
10
|
+
path: string;
|
|
11
|
+
title: string;
|
|
12
|
+
loader: () => Promise<JSX.Element>;
|
|
13
|
+
routeRef?: RouteRef;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Extension blueprint for creating DevTools content pages (appearing as tabs)
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* const myDevToolsContent = DevToolsContentBlueprint.make({
|
|
21
|
+
* {
|
|
22
|
+
* params: {
|
|
23
|
+
* path: 'my-dev-tools',
|
|
24
|
+
* title: 'My DevTools',
|
|
25
|
+
* loader: () =>
|
|
26
|
+
* import('../components/MyDevTools').then(m =>
|
|
27
|
+
* compatWrapper(<m.MyDevTools />),
|
|
28
|
+
* ),
|
|
29
|
+
* },
|
|
30
|
+
* },
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
declare const DevToolsContentBlueprint: _backstage_frontend_plugin_api.ExtensionBlueprint<{
|
|
36
|
+
kind: "devtools-content";
|
|
37
|
+
params: DevToolsContentBlueprintParams;
|
|
38
|
+
output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
|
|
39
|
+
optional: true;
|
|
40
|
+
}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.title", {}>;
|
|
41
|
+
inputs: {};
|
|
42
|
+
config: {
|
|
43
|
+
path: string | undefined;
|
|
44
|
+
title: string | undefined;
|
|
45
|
+
};
|
|
46
|
+
configInput: {
|
|
47
|
+
title?: string | undefined;
|
|
48
|
+
path?: string | undefined;
|
|
49
|
+
};
|
|
50
|
+
dataRefs: never;
|
|
51
|
+
}>;
|
|
52
|
+
|
|
53
|
+
export { DevToolsContentBlueprint };
|
|
54
|
+
export type { DevToolsContentBlueprintParams };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@backstage/plugin-devtools-react",
|
|
3
|
+
"version": "0.0.0-nightly-20260127025640",
|
|
4
|
+
"description": "Web library for the devtools plugin",
|
|
5
|
+
"backstage": {
|
|
6
|
+
"role": "web-library",
|
|
7
|
+
"pluginId": "devtools",
|
|
8
|
+
"pluginPackages": [
|
|
9
|
+
"@backstage/plugin-devtools",
|
|
10
|
+
"@backstage/plugin-devtools-backend",
|
|
11
|
+
"@backstage/plugin-devtools-common",
|
|
12
|
+
"@backstage/plugin-devtools-react"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public",
|
|
17
|
+
"main": "dist/index.esm.js",
|
|
18
|
+
"types": "dist/index.d.ts"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/backstage/backstage",
|
|
23
|
+
"directory": "plugins/devtools-react"
|
|
24
|
+
},
|
|
25
|
+
"license": "Apache-2.0",
|
|
26
|
+
"sideEffects": false,
|
|
27
|
+
"main": "dist/index.esm.js",
|
|
28
|
+
"types": "dist/index.d.ts",
|
|
29
|
+
"files": [
|
|
30
|
+
"dist"
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "backstage-cli package build",
|
|
34
|
+
"clean": "backstage-cli package clean",
|
|
35
|
+
"lint": "backstage-cli package lint",
|
|
36
|
+
"prepack": "backstage-cli package prepack",
|
|
37
|
+
"postpack": "backstage-cli package postpack",
|
|
38
|
+
"start": "backstage-cli package start",
|
|
39
|
+
"test": "backstage-cli package test"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@backstage/core-plugin-api": "0.0.0-nightly-20260127025640",
|
|
43
|
+
"@backstage/frontend-plugin-api": "0.0.0-nightly-20260127025640",
|
|
44
|
+
"@material-ui/core": "^4.9.13"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@backstage/cli": "0.0.0-nightly-20260127025640",
|
|
48
|
+
"@backstage/test-utils": "0.0.0-nightly-20260127025640",
|
|
49
|
+
"@testing-library/jest-dom": "^6.0.0",
|
|
50
|
+
"@testing-library/react": "^14.0.0",
|
|
51
|
+
"@types/react": "^18.0.0",
|
|
52
|
+
"react": "^18.0.2",
|
|
53
|
+
"react-dom": "^18.0.2",
|
|
54
|
+
"react-router-dom": "^6.3.0"
|
|
55
|
+
},
|
|
56
|
+
"peerDependencies": {
|
|
57
|
+
"@types/react": "^17.0.0 || ^18.0.0",
|
|
58
|
+
"react": "^17.0.0 || ^18.0.0",
|
|
59
|
+
"react-dom": "^17.0.0 || ^18.0.0",
|
|
60
|
+
"react-router-dom": "^6.3.0"
|
|
61
|
+
},
|
|
62
|
+
"peerDependenciesMeta": {
|
|
63
|
+
"@types/react": {
|
|
64
|
+
"optional": true
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"typesVersions": {
|
|
68
|
+
"*": {
|
|
69
|
+
"package.json": [
|
|
70
|
+
"package.json"
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"module": "./dist/index.esm.js"
|
|
75
|
+
}
|