@backstage/plugin-devtools 0.1.17-next.3 → 0.1.18-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,34 @@
1
1
  # @backstage/plugin-devtools
2
2
 
3
+ ## 0.1.18-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - fec8b57: Updated exports to use the new type parameters for extensions and extension blueprints.
8
+ - 019d9ad: Minor dockerfile syntax update
9
+ - Updated dependencies
10
+ - @backstage/frontend-plugin-api@0.8.0-next.0
11
+ - @backstage/core-compat-api@0.2.9-next.0
12
+ - @backstage/core-components@0.14.10
13
+ - @backstage/core-plugin-api@1.9.3
14
+ - @backstage/errors@1.2.4
15
+ - @backstage/plugin-devtools-common@0.1.12
16
+ - @backstage/plugin-permission-react@0.4.25
17
+
18
+ ## 0.1.17
19
+
20
+ ### Patch Changes
21
+
22
+ - c7603e8: Deprecate the old pattern of `create*Extension`, and replace it with the equivalent Blueprint implementation instead
23
+ - Updated dependencies
24
+ - @backstage/frontend-plugin-api@0.7.0
25
+ - @backstage/core-components@0.14.10
26
+ - @backstage/core-compat-api@0.2.8
27
+ - @backstage/core-plugin-api@1.9.3
28
+ - @backstage/errors@1.2.4
29
+ - @backstage/plugin-devtools-common@0.1.12
30
+ - @backstage/plugin-permission-react@0.4.25
31
+
3
32
  ## 0.1.17-next.3
4
33
 
5
34
  ### Patch Changes
package/README.md CHANGED
@@ -20,7 +20,7 @@ You may need to modify your Dockerfile to ensure `backstage.json` is copied into
20
20
  ```sh
21
21
  WORKDIR /app
22
22
  # This switches many Node.js dependencies to production mode.
23
- ENV NODE_ENV production
23
+ ENV NODE_ENV=production
24
24
 
25
25
  # Then copy the rest of the backend bundle, along with any other files we might want (including backstage.json).
26
26
  COPY --chown=node:node ... backstage.json ./
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-devtools__alpha",
3
- "version": "0.1.17-next.3",
3
+ "version": "0.1.18-next.0",
4
4
  "main": "../dist/alpha.esm.js",
5
5
  "module": "../dist/alpha.esm.js",
6
6
  "types": "../dist/alpha.d.ts"
@@ -1,34 +1,40 @@
1
1
  import React from 'react';
2
- import { createApiExtension, createApiFactory, discoveryApiRef, fetchApiRef, createPageExtension, createNavItemExtension, createPlugin } from '@backstage/frontend-plugin-api';
2
+ import { ApiBlueprint, createApiFactory, discoveryApiRef, fetchApiRef, PageBlueprint, NavItemBlueprint, createFrontendPlugin } from '@backstage/frontend-plugin-api';
3
3
  import { devToolsApiRef } from '../api/DevToolsApi.esm.js';
4
4
  import { DevToolsClient } from '../api/DevToolsClient.esm.js';
5
5
  import { convertLegacyRouteRef, compatWrapper } from '@backstage/core-compat-api';
6
6
  import BuildIcon from '@material-ui/icons/Build';
7
7
  import { rootRouteRef } from '../routes.esm.js';
8
8
 
9
- const devToolsApi = createApiExtension({
10
- factory: createApiFactory({
11
- api: devToolsApiRef,
12
- deps: {
13
- discoveryApi: discoveryApiRef,
14
- fetchApi: fetchApiRef
15
- },
16
- factory: ({ discoveryApi, fetchApi }) => new DevToolsClient({ discoveryApi, fetchApi })
17
- })
9
+ const devToolsApi = ApiBlueprint.make({
10
+ params: {
11
+ factory: createApiFactory({
12
+ api: devToolsApiRef,
13
+ deps: {
14
+ discoveryApi: discoveryApiRef,
15
+ fetchApi: fetchApiRef
16
+ },
17
+ factory: ({ discoveryApi, fetchApi }) => new DevToolsClient({ discoveryApi, fetchApi })
18
+ })
19
+ }
18
20
  });
19
- const devToolsPage = createPageExtension({
20
- defaultPath: "/devtools",
21
- routeRef: convertLegacyRouteRef(rootRouteRef),
22
- loader: () => import('../components/DevToolsPage/index.esm.js').then(
23
- (m) => compatWrapper(/* @__PURE__ */ React.createElement(m.DevToolsPage, null))
24
- )
21
+ const devToolsPage = PageBlueprint.make({
22
+ params: {
23
+ defaultPath: "/devtools",
24
+ routeRef: convertLegacyRouteRef(rootRouteRef),
25
+ loader: () => import('../components/DevToolsPage/index.esm.js').then(
26
+ (m) => compatWrapper(/* @__PURE__ */ React.createElement(m.DevToolsPage, null))
27
+ )
28
+ }
25
29
  });
26
- const devToolsNavItem = createNavItemExtension({
27
- title: "DevTools",
28
- routeRef: convertLegacyRouteRef(rootRouteRef),
29
- icon: BuildIcon
30
+ const devToolsNavItem = NavItemBlueprint.make({
31
+ params: {
32
+ title: "DevTools",
33
+ routeRef: convertLegacyRouteRef(rootRouteRef),
34
+ icon: BuildIcon
35
+ }
30
36
  });
31
- var plugin = createPlugin({
37
+ var plugin = createFrontendPlugin({
32
38
  id: "devtools",
33
39
  routes: {
34
40
  root: convertLegacyRouteRef(rootRouteRef)
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.esm.js","sources":["../../src/alpha/plugin.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport {\n createApiExtension,\n createApiFactory,\n createNavItemExtension,\n createPageExtension,\n createPlugin,\n discoveryApiRef,\n fetchApiRef,\n} from '@backstage/frontend-plugin-api';\n\nimport { devToolsApiRef, DevToolsClient } from '../api';\nimport {\n compatWrapper,\n convertLegacyRouteRef,\n} from '@backstage/core-compat-api';\nimport BuildIcon from '@material-ui/icons/Build';\nimport { rootRouteRef } from '../routes';\n\n/** @alpha */\nexport const devToolsApi = createApiExtension({\n factory: createApiFactory({\n api: devToolsApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ discoveryApi, fetchApi }) =>\n new DevToolsClient({ discoveryApi, fetchApi }),\n }),\n});\n\n/** @alpha */\nexport const devToolsPage = createPageExtension({\n defaultPath: '/devtools',\n routeRef: convertLegacyRouteRef(rootRouteRef),\n loader: () =>\n import('../components/DevToolsPage').then(m =>\n compatWrapper(<m.DevToolsPage />),\n ),\n});\n\n/** @alpha */\nexport const devToolsNavItem = createNavItemExtension({\n title: 'DevTools',\n routeRef: convertLegacyRouteRef(rootRouteRef),\n icon: BuildIcon,\n});\n\n/** @alpha */\nexport default createPlugin({\n id: 'devtools',\n routes: {\n root: convertLegacyRouteRef(rootRouteRef),\n },\n extensions: [devToolsApi, devToolsPage, devToolsNavItem],\n});\n"],"names":[],"mappings":";;;;;;;;AAoCO,MAAM,cAAc,kBAAmB,CAAA;AAAA,EAC5C,SAAS,gBAAiB,CAAA;AAAA,IACxB,GAAK,EAAA,cAAA;AAAA,IACL,IAAM,EAAA;AAAA,MACJ,YAAc,EAAA,eAAA;AAAA,MACd,QAAU,EAAA,WAAA;AAAA,KACZ;AAAA,IACA,OAAA,EAAS,CAAC,EAAE,YAAc,EAAA,QAAA,EACxB,KAAA,IAAI,cAAe,CAAA,EAAE,YAAc,EAAA,QAAA,EAAU,CAAA;AAAA,GAChD,CAAA;AACH,CAAC,EAAA;AAGM,MAAM,eAAe,mBAAoB,CAAA;AAAA,EAC9C,WAAa,EAAA,WAAA;AAAA,EACb,QAAA,EAAU,sBAAsB,YAAY,CAAA;AAAA,EAC5C,MAAQ,EAAA,MACN,OAAO,yCAA4B,CAAE,CAAA,IAAA;AAAA,IAAK,OACxC,aAAc,iBAAA,KAAA,CAAA,aAAA,CAAC,CAAE,CAAA,YAAA,EAAF,IAAe,CAAE,CAAA;AAAA,GAClC;AACJ,CAAC,EAAA;AAGM,MAAM,kBAAkB,sBAAuB,CAAA;AAAA,EACpD,KAAO,EAAA,UAAA;AAAA,EACP,QAAA,EAAU,sBAAsB,YAAY,CAAA;AAAA,EAC5C,IAAM,EAAA,SAAA;AACR,CAAC,EAAA;AAGD,aAAe,YAAa,CAAA;AAAA,EAC1B,EAAI,EAAA,UAAA;AAAA,EACJ,MAAQ,EAAA;AAAA,IACN,IAAA,EAAM,sBAAsB,YAAY,CAAA;AAAA,GAC1C;AAAA,EACA,UAAY,EAAA,CAAC,WAAa,EAAA,YAAA,EAAc,eAAe,CAAA;AACzD,CAAC,CAAA;;;;"}
1
+ {"version":3,"file":"plugin.esm.js","sources":["../../src/alpha/plugin.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport {\n createApiFactory,\n createFrontendPlugin,\n discoveryApiRef,\n fetchApiRef,\n ApiBlueprint,\n PageBlueprint,\n NavItemBlueprint,\n} from '@backstage/frontend-plugin-api';\n\nimport { devToolsApiRef, DevToolsClient } from '../api';\nimport {\n compatWrapper,\n convertLegacyRouteRef,\n} from '@backstage/core-compat-api';\nimport BuildIcon from '@material-ui/icons/Build';\nimport { rootRouteRef } from '../routes';\n\n/** @alpha */\nexport const devToolsApi = ApiBlueprint.make({\n params: {\n factory: createApiFactory({\n api: devToolsApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ discoveryApi, fetchApi }) =>\n new DevToolsClient({ discoveryApi, fetchApi }),\n }),\n },\n});\n\n/** @alpha */\nexport const devToolsPage = PageBlueprint.make({\n params: {\n defaultPath: '/devtools',\n routeRef: convertLegacyRouteRef(rootRouteRef),\n loader: () =>\n import('../components/DevToolsPage').then(m =>\n compatWrapper(<m.DevToolsPage />),\n ),\n },\n});\n\n/** @alpha */\nexport const devToolsNavItem = NavItemBlueprint.make({\n params: {\n title: 'DevTools',\n routeRef: convertLegacyRouteRef(rootRouteRef),\n icon: BuildIcon,\n },\n});\n\n/** @alpha */\nexport default createFrontendPlugin({\n id: 'devtools',\n routes: {\n root: convertLegacyRouteRef(rootRouteRef),\n },\n extensions: [devToolsApi, devToolsPage, devToolsNavItem],\n});\n"],"names":[],"mappings":";;;;;;;;AAoCa,MAAA,WAAA,GAAc,aAAa,IAAK,CAAA;AAAA,EAC3C,MAAQ,EAAA;AAAA,IACN,SAAS,gBAAiB,CAAA;AAAA,MACxB,GAAK,EAAA,cAAA;AAAA,MACL,IAAM,EAAA;AAAA,QACJ,YAAc,EAAA,eAAA;AAAA,QACd,QAAU,EAAA,WAAA;AAAA,OACZ;AAAA,MACA,OAAA,EAAS,CAAC,EAAE,YAAc,EAAA,QAAA,EACxB,KAAA,IAAI,cAAe,CAAA,EAAE,YAAc,EAAA,QAAA,EAAU,CAAA;AAAA,KAChD,CAAA;AAAA,GACH;AACF,CAAC,EAAA;AAGY,MAAA,YAAA,GAAe,cAAc,IAAK,CAAA;AAAA,EAC7C,MAAQ,EAAA;AAAA,IACN,WAAa,EAAA,WAAA;AAAA,IACb,QAAA,EAAU,sBAAsB,YAAY,CAAA;AAAA,IAC5C,MAAQ,EAAA,MACN,OAAO,yCAA4B,CAAE,CAAA,IAAA;AAAA,MAAK,OACxC,aAAc,iBAAA,KAAA,CAAA,aAAA,CAAC,CAAE,CAAA,YAAA,EAAF,IAAe,CAAE,CAAA;AAAA,KAClC;AAAA,GACJ;AACF,CAAC,EAAA;AAGY,MAAA,eAAA,GAAkB,iBAAiB,IAAK,CAAA;AAAA,EACnD,MAAQ,EAAA;AAAA,IACN,KAAO,EAAA,UAAA;AAAA,IACP,QAAA,EAAU,sBAAsB,YAAY,CAAA;AAAA,IAC5C,IAAM,EAAA,SAAA;AAAA,GACR;AACF,CAAC,EAAA;AAGD,aAAe,oBAAqB,CAAA;AAAA,EAClC,EAAI,EAAA,UAAA;AAAA,EACJ,MAAQ,EAAA;AAAA,IACN,IAAA,EAAM,sBAAsB,YAAY,CAAA;AAAA,GAC1C;AAAA,EACA,UAAY,EAAA,CAAC,WAAa,EAAA,YAAA,EAAc,eAAe,CAAA;AACzD,CAAC,CAAA;;;;"}
package/dist/alpha.d.ts CHANGED
@@ -1,8 +1,48 @@
1
+ import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
1
2
  import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
3
+ import React__default from 'react';
2
4
 
3
5
  /** @alpha */
4
6
  declare const _default: _backstage_frontend_plugin_api.BackstagePlugin<{
5
7
  root: _backstage_frontend_plugin_api.RouteRef<undefined>;
6
- }, {}, {}>;
8
+ }, {}, {
9
+ "api:devtools": _backstage_frontend_plugin_api.ExtensionDefinition<{
10
+ kind: "api";
11
+ namespace: undefined;
12
+ name: undefined;
13
+ config: {};
14
+ configInput: {};
15
+ output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.AnyApiFactory, "core.api.factory", {}>;
16
+ inputs: {};
17
+ }>;
18
+ "page:devtools": _backstage_frontend_plugin_api.ExtensionDefinition<{
19
+ kind: "page";
20
+ namespace: undefined;
21
+ name: undefined;
22
+ config: {
23
+ path: string | undefined;
24
+ };
25
+ configInput: {
26
+ path?: string | undefined;
27
+ };
28
+ output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<React__default.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
29
+ optional: true;
30
+ }>;
31
+ inputs: {};
32
+ }>;
33
+ "nav-item:devtools": _backstage_frontend_plugin_api.ExtensionDefinition<{
34
+ kind: "nav-item";
35
+ namespace: undefined;
36
+ name: undefined;
37
+ config: {};
38
+ configInput: {};
39
+ output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<{
40
+ title: string;
41
+ icon: _backstage_core_plugin_api.IconComponent;
42
+ routeRef: _backstage_frontend_plugin_api.RouteRef<undefined>;
43
+ }, "core.nav-item.target", {}>;
44
+ inputs: {};
45
+ }>;
46
+ }>;
7
47
 
8
48
  export { _default as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-devtools",
3
- "version": "0.1.17-next.3",
3
+ "version": "0.1.18-next.0",
4
4
  "backstage": {
5
5
  "role": "frontend-plugin",
6
6
  "pluginId": "devtools",
@@ -50,13 +50,13 @@
50
50
  "test": "backstage-cli package test"
51
51
  },
52
52
  "dependencies": {
53
- "@backstage/core-compat-api": "^0.2.8-next.3",
54
- "@backstage/core-components": "^0.14.10-next.0",
53
+ "@backstage/core-compat-api": "^0.2.9-next.0",
54
+ "@backstage/core-components": "^0.14.10",
55
55
  "@backstage/core-plugin-api": "^1.9.3",
56
56
  "@backstage/errors": "^1.2.4",
57
- "@backstage/frontend-plugin-api": "^0.7.0-next.3",
58
- "@backstage/plugin-devtools-common": "^0.1.12-next.1",
59
- "@backstage/plugin-permission-react": "^0.4.25-next.1",
57
+ "@backstage/frontend-plugin-api": "^0.8.0-next.0",
58
+ "@backstage/plugin-devtools-common": "^0.1.12",
59
+ "@backstage/plugin-permission-react": "^0.4.25",
60
60
  "@material-ui/core": "^4.9.13",
61
61
  "@material-ui/icons": "^4.9.1",
62
62
  "@material-ui/lab": "^4.0.0-alpha.57",
@@ -64,8 +64,8 @@
64
64
  "react-use": "^17.2.4"
65
65
  },
66
66
  "devDependencies": {
67
- "@backstage/cli": "^0.27.0-next.4",
68
- "@backstage/dev-utils": "^1.0.37-next.3",
67
+ "@backstage/cli": "^0.27.1-next.0",
68
+ "@backstage/dev-utils": "^1.0.38-next.0",
69
69
  "@testing-library/jest-dom": "^6.0.0"
70
70
  },
71
71
  "peerDependencies": {