@backstage/plugin-devtools 0.1.13 → 0.1.14-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.
Files changed (46) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/alpha/package.json +1 -1
  3. package/dist/alpha/plugin.esm.js +40 -0
  4. package/dist/alpha/plugin.esm.js.map +1 -0
  5. package/dist/alpha.esm.js +1 -39
  6. package/dist/alpha.esm.js.map +1 -1
  7. package/dist/api/DevToolsApi.esm.js +8 -0
  8. package/dist/api/DevToolsApi.esm.js.map +1 -0
  9. package/dist/{esm/routes-DecpDktH.esm.js → api/DevToolsClient.esm.js} +2 -11
  10. package/dist/api/DevToolsClient.esm.js.map +1 -0
  11. package/dist/components/Content/ConfigContent/ConfigContent.esm.js +56 -0
  12. package/dist/components/Content/ConfigContent/ConfigContent.esm.js.map +1 -0
  13. package/dist/components/Content/ExternalDependenciesContent/ExternalDependenciesContent.esm.js +84 -0
  14. package/dist/components/Content/ExternalDependenciesContent/ExternalDependenciesContent.esm.js.map +1 -0
  15. package/dist/components/Content/InfoContent/BackstageLogoIcon.esm.js +7 -0
  16. package/dist/components/Content/InfoContent/BackstageLogoIcon.esm.js.map +1 -0
  17. package/dist/components/Content/InfoContent/InfoContent.esm.js +107 -0
  18. package/dist/components/Content/InfoContent/InfoContent.esm.js.map +1 -0
  19. package/dist/components/Content/InfoContent/InfoDependenciesTable.esm.js +38 -0
  20. package/dist/components/Content/InfoContent/InfoDependenciesTable.esm.js.map +1 -0
  21. package/dist/components/DefaultDevToolsPage/DefaultDevToolsPage.esm.js +11 -0
  22. package/dist/components/DefaultDevToolsPage/DefaultDevToolsPage.esm.js.map +1 -0
  23. package/dist/components/DevToolsLayout/DevToolsLayout.esm.js +26 -0
  24. package/dist/components/DevToolsLayout/DevToolsLayout.esm.js.map +1 -0
  25. package/dist/components/DevToolsPage/DevToolsPage.esm.js +11 -0
  26. package/dist/components/DevToolsPage/DevToolsPage.esm.js.map +1 -0
  27. package/dist/components/DevToolsPage/index.esm.js +2 -0
  28. package/dist/components/DevToolsPage/index.esm.js.map +1 -0
  29. package/dist/hooks/useConfig.esm.js +19 -0
  30. package/dist/hooks/useConfig.esm.js.map +1 -0
  31. package/dist/hooks/useExternalDependencies.esm.js +19 -0
  32. package/dist/hooks/useExternalDependencies.esm.js.map +1 -0
  33. package/dist/hooks/useInfo.esm.js +19 -0
  34. package/dist/hooks/useInfo.esm.js.map +1 -0
  35. package/dist/index.esm.js +5 -132
  36. package/dist/index.esm.js.map +1 -1
  37. package/dist/plugin.esm.js +31 -0
  38. package/dist/plugin.esm.js.map +1 -0
  39. package/dist/routes.esm.js +8 -0
  40. package/dist/routes.esm.js.map +1 -0
  41. package/package.json +6 -6
  42. package/dist/esm/DevToolsLayout-DSYudEJZ.esm.js +0 -226
  43. package/dist/esm/DevToolsLayout-DSYudEJZ.esm.js.map +0 -1
  44. package/dist/esm/index-DFeYEXKU.esm.js +0 -38
  45. package/dist/esm/index-DFeYEXKU.esm.js.map +0 -1
  46. package/dist/esm/routes-DecpDktH.esm.js.map +0 -1
@@ -1,38 +0,0 @@
1
- import React from 'react';
2
- import { useOutlet } from 'react-router-dom';
3
- import { devToolsInfoReadPermission, devToolsConfigReadPermission } from '@backstage/plugin-devtools-common';
4
- import { D as DevToolsLayout, I as InfoContent, C as ConfigContent } from './DevToolsLayout-DSYudEJZ.esm.js';
5
- import { RequirePermission } from '@backstage/plugin-permission-react';
6
- import '@backstage/core-components';
7
- import '@material-ui/core/Box';
8
- import '@material-ui/core/Paper';
9
- import '@material-ui/core/Typography';
10
- import '@material-ui/core/styles';
11
- import '@material-ui/lab/Alert';
12
- import 'react-json-view';
13
- import './routes-DecpDktH.esm.js';
14
- import '@backstage/core-plugin-api';
15
- import '@backstage/errors';
16
- import 'react-use/esm/useAsync';
17
- import '@material-ui/core/Avatar';
18
- import '@material-ui/core/Divider';
19
- import '@material-ui/core/List';
20
- import '@material-ui/core/ListItem';
21
- import '@material-ui/core/ListItemAvatar';
22
- import '@material-ui/core/ListItemText';
23
- import '@material-ui/core/Button';
24
- import '@material-ui/icons/Description';
25
- import '@material-ui/icons/Memory';
26
- import '@material-ui/icons/DeveloperBoard';
27
- import '@material-ui/core/SvgIcon';
28
- import '@material-ui/icons/FileCopy';
29
-
30
- const DefaultDevToolsPage = () => /* @__PURE__ */ React.createElement(DevToolsLayout, null, /* @__PURE__ */ React.createElement(DevToolsLayout.Route, { path: "info", title: "Info" }, /* @__PURE__ */ React.createElement(RequirePermission, { permission: devToolsInfoReadPermission }, /* @__PURE__ */ React.createElement(InfoContent, null))), /* @__PURE__ */ React.createElement(DevToolsLayout.Route, { path: "config", title: "Config" }, /* @__PURE__ */ React.createElement(RequirePermission, { permission: devToolsConfigReadPermission }, /* @__PURE__ */ React.createElement(ConfigContent, null))));
31
-
32
- const DevToolsPage = () => {
33
- const outlet = useOutlet();
34
- return /* @__PURE__ */ React.createElement(React.Fragment, null, outlet || /* @__PURE__ */ React.createElement(DefaultDevToolsPage, null));
35
- };
36
-
37
- export { DevToolsPage };
38
- //# sourceMappingURL=index-DFeYEXKU.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-DFeYEXKU.esm.js","sources":["../../src/components/DefaultDevToolsPage/DefaultDevToolsPage.tsx","../../src/components/DevToolsPage/DevToolsPage.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 devToolsConfigReadPermission,\n devToolsInfoReadPermission,\n} from '@backstage/plugin-devtools-common';\n\nimport { ConfigContent } from '../Content/ConfigContent';\nimport { DevToolsLayout } from '../DevToolsLayout';\nimport { InfoContent } from '../Content/InfoContent';\nimport React from 'react';\nimport { RequirePermission } from '@backstage/plugin-permission-react';\n\n/** @public */\nexport const DefaultDevToolsPage = () => (\n <DevToolsLayout>\n <DevToolsLayout.Route path=\"info\" title=\"Info\">\n <RequirePermission permission={devToolsInfoReadPermission}>\n <InfoContent />\n </RequirePermission>\n </DevToolsLayout.Route>\n <DevToolsLayout.Route path=\"config\" title=\"Config\">\n <RequirePermission permission={devToolsConfigReadPermission}>\n <ConfigContent />\n </RequirePermission>\n </DevToolsLayout.Route>\n </DevToolsLayout>\n);\n","/*\n * Copyright 2022 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 { useOutlet } from 'react-router-dom';\nimport { DefaultDevToolsPage } from '../DefaultDevToolsPage';\n\nexport const DevToolsPage = () => {\n const outlet = useOutlet();\n\n return <>{outlet || <DefaultDevToolsPage />}</>;\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BO,MAAM,sBAAsB,sBACjC,KAAA,CAAA,aAAA,CAAC,cACC,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,eAAe,KAAf,EAAA,EAAqB,IAAK,EAAA,MAAA,EAAO,OAAM,MACtC,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,iBAAkB,EAAA,EAAA,UAAA,EAAY,8CAC5B,KAAA,CAAA,aAAA,CAAA,WAAA,EAAA,IAAY,CACf,CACF,mBACC,KAAA,CAAA,aAAA,CAAA,cAAA,CAAe,KAAf,EAAA,EAAqB,MAAK,QAAS,EAAA,KAAA,EAAM,QACxC,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,qBAAkB,UAAY,EAAA,4BAAA,EAAA,sCAC5B,aAAc,EAAA,IAAA,CACjB,CACF,CACF,CAAA;;ACpBK,MAAM,eAAe,MAAM;AAChC,EAAA,MAAM,SAAS,SAAU,EAAA,CAAA;AAEzB,EAAA,uBAAU,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EAAA,MAAA,oBAAW,KAAA,CAAA,aAAA,CAAA,mBAAA,EAAA,IAAoB,CAAG,CAAA,CAAA;AAC9C;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"routes-DecpDktH.esm.js","sources":["../../src/api/DevToolsApi.ts","../../src/api/DevToolsClient.ts","../../src/routes.ts"],"sourcesContent":["/*\n * Copyright 2022 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 { createApiRef } from '@backstage/core-plugin-api';\nimport {\n ConfigInfo,\n DevToolsInfo,\n ExternalDependency,\n} from '@backstage/plugin-devtools-common';\n\nexport const devToolsApiRef = createApiRef<DevToolsApi>({\n id: 'plugin.devtools.service',\n});\n\nexport interface DevToolsApi {\n getConfig(): Promise<ConfigInfo | undefined>;\n getExternalDependencies(): Promise<ExternalDependency[] | undefined>;\n getInfo(): Promise<DevToolsInfo | undefined>;\n}\n","/*\n * Copyright 2022 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 { DiscoveryApi, FetchApi } from '@backstage/core-plugin-api';\nimport {\n ConfigInfo,\n DevToolsInfo,\n ExternalDependency,\n} from '@backstage/plugin-devtools-common';\nimport { ResponseError } from '@backstage/errors';\nimport { DevToolsApi } from './DevToolsApi';\n\nexport class DevToolsClient implements DevToolsApi {\n private readonly discoveryApi: DiscoveryApi;\n private readonly fetchApi: FetchApi;\n\n public constructor(options: {\n discoveryApi: DiscoveryApi;\n fetchApi: FetchApi;\n }) {\n this.discoveryApi = options.discoveryApi;\n this.fetchApi = options.fetchApi;\n }\n\n public async getConfig(): Promise<ConfigInfo | undefined> {\n const urlSegment = 'config';\n\n const configInfo = await this.get<ConfigInfo | undefined>(urlSegment);\n return configInfo;\n }\n\n public async getExternalDependencies(): Promise<\n ExternalDependency[] | undefined\n > {\n const urlSegment = 'external-dependencies';\n\n const externalDependencies = await this.get<\n ExternalDependency[] | undefined\n >(urlSegment);\n return externalDependencies;\n }\n\n public async getInfo(): Promise<DevToolsInfo | undefined> {\n const urlSegment = 'info';\n\n const info = await this.get<DevToolsInfo | undefined>(urlSegment);\n return info;\n }\n\n private async get<T>(path: string): Promise<T> {\n const baseUrl = `${await this.discoveryApi.getBaseUrl('devtools')}/`;\n const url = new URL(path, baseUrl);\n\n const response = await this.fetchApi.fetch(url.toString());\n\n if (!response.ok) {\n throw await ResponseError.fromResponse(response);\n }\n\n return response.json() as Promise<T>;\n }\n}\n","/*\n * Copyright 2022 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 { createRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'devtools',\n});\n"],"names":[],"mappings":";;;AAuBO,MAAM,iBAAiB,YAA0B,CAAA;AAAA,EACtD,EAAI,EAAA,yBAAA;AACN,CAAC;;;;;;;;ACAM,MAAM,cAAsC,CAAA;AAAA,EAI1C,YAAY,OAGhB,EAAA;AANH,IAAiB,aAAA,CAAA,IAAA,EAAA,cAAA,CAAA,CAAA;AACjB,IAAiB,aAAA,CAAA,IAAA,EAAA,UAAA,CAAA,CAAA;AAMf,IAAA,IAAA,CAAK,eAAe,OAAQ,CAAA,YAAA,CAAA;AAC5B,IAAA,IAAA,CAAK,WAAW,OAAQ,CAAA,QAAA,CAAA;AAAA,GAC1B;AAAA,EAEA,MAAa,SAA6C,GAAA;AACxD,IAAA,MAAM,UAAa,GAAA,QAAA,CAAA;AAEnB,IAAA,MAAM,UAAa,GAAA,MAAM,IAAK,CAAA,GAAA,CAA4B,UAAU,CAAA,CAAA;AACpE,IAAO,OAAA,UAAA,CAAA;AAAA,GACT;AAAA,EAEA,MAAa,uBAEX,GAAA;AACA,IAAA,MAAM,UAAa,GAAA,uBAAA,CAAA;AAEnB,IAAA,MAAM,oBAAuB,GAAA,MAAM,IAAK,CAAA,GAAA,CAEtC,UAAU,CAAA,CAAA;AACZ,IAAO,OAAA,oBAAA,CAAA;AAAA,GACT;AAAA,EAEA,MAAa,OAA6C,GAAA;AACxD,IAAA,MAAM,UAAa,GAAA,MAAA,CAAA;AAEnB,IAAA,MAAM,IAAO,GAAA,MAAM,IAAK,CAAA,GAAA,CAA8B,UAAU,CAAA,CAAA;AAChE,IAAO,OAAA,IAAA,CAAA;AAAA,GACT;AAAA,EAEA,MAAc,IAAO,IAA0B,EAAA;AAC7C,IAAA,MAAM,UAAU,CAAG,EAAA,MAAM,KAAK,YAAa,CAAA,UAAA,CAAW,UAAU,CAAC,CAAA,CAAA,CAAA,CAAA;AACjE,IAAA,MAAM,GAAM,GAAA,IAAI,GAAI,CAAA,IAAA,EAAM,OAAO,CAAA,CAAA;AAEjC,IAAA,MAAM,WAAW,MAAM,IAAA,CAAK,SAAS,KAAM,CAAA,GAAA,CAAI,UAAU,CAAA,CAAA;AAEzD,IAAI,IAAA,CAAC,SAAS,EAAI,EAAA;AAChB,MAAM,MAAA,MAAM,aAAc,CAAA,YAAA,CAAa,QAAQ,CAAA,CAAA;AAAA,KACjD;AAEA,IAAA,OAAO,SAAS,IAAK,EAAA,CAAA;AAAA,GACvB;AACF;;ACxDO,MAAM,eAAe,cAAe,CAAA;AAAA,EACzC,EAAI,EAAA,UAAA;AACN,CAAC;;;;"}