@backstage-community/plugin-ocm 5.2.3 → 5.2.5
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 +14 -0
- package/dist/components/ClusterAvailableResourcesCard/ClusterAvailableResourcesCard.esm.js.map +1 -1
- package/dist/components/ClusterContext/ClusterContext.esm.js.map +1 -1
- package/dist/components/ClusterInfoCard/ClusterInfoCard.esm.js.map +1 -1
- package/dist/index.d.ts +25 -1
- package/dist/plugin.esm.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
### Dependencies
|
|
2
2
|
|
|
3
|
+
## 5.2.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 40f3226: Clean up api report warnings and remove unnecessary files
|
|
8
|
+
- Updated dependencies [40f3226]
|
|
9
|
+
- @backstage-community/plugin-ocm-common@3.6.2
|
|
10
|
+
|
|
11
|
+
## 5.2.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- a6e850f: Updated dependency `msw` to `1.3.5`.
|
|
16
|
+
|
|
3
17
|
## 5.2.3
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/components/ClusterAvailableResourcesCard/ClusterAvailableResourcesCard.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClusterAvailableResourcesCard.esm.js","sources":["../../../src/components/ClusterAvailableResourcesCard/ClusterAvailableResourcesCard.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 */\nimport React from 'react';\n\nimport { RequirePermission } from '@backstage/plugin-permission-react';\n\nimport { ocmEntityReadPermission } from '@backstage-community/plugin-ocm-common';\n\nimport { useCluster } from '../ClusterContext';\nimport { TableCardFromData } from '../TableCardFromData';\n\nexport const ClusterAvailableResourceCard = (): any => {\n const { data } = useCluster();\n\n if (!data) {\n return null;\n }\n\n if (!('availableResources' in data!)) {\n return null;\n }\n\n const nameMap = new Map<string, string>([\n ['cpuCores', 'CPU cores'],\n ['memorySize', 'Memory size'],\n ['numberOfPods', 'Number of pods'],\n ]);\n return (\n <RequirePermission permission={ocmEntityReadPermission}>\n <TableCardFromData\n data={data.availableResources}\n title=\"Available\"\n nameMap={nameMap}\n />\n </RequirePermission>\n );\n};\n"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"ClusterAvailableResourcesCard.esm.js","sources":["../../../src/components/ClusterAvailableResourcesCard/ClusterAvailableResourcesCard.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 */\nimport React from 'react';\n\nimport { RequirePermission } from '@backstage/plugin-permission-react';\n\nimport { ocmEntityReadPermission } from '@backstage-community/plugin-ocm-common';\n\nimport { useCluster } from '../ClusterContext';\nimport { TableCardFromData } from '../TableCardFromData';\n\n/**\n * @public\n */\nexport const ClusterAvailableResourceCard = (): any => {\n const { data } = useCluster();\n\n if (!data) {\n return null;\n }\n\n if (!('availableResources' in data!)) {\n return null;\n }\n\n const nameMap = new Map<string, string>([\n ['cpuCores', 'CPU cores'],\n ['memorySize', 'Memory size'],\n ['numberOfPods', 'Number of pods'],\n ]);\n return (\n <RequirePermission permission={ocmEntityReadPermission}>\n <TableCardFromData\n data={data.availableResources}\n title=\"Available\"\n nameMap={nameMap}\n />\n </RequirePermission>\n );\n};\n"],"names":[],"mappings":";;;;;;AA2BO,MAAM,+BAA+B,MAAW;AACrD,EAAM,MAAA,EAAE,IAAK,EAAA,GAAI,UAAW,EAAA,CAAA;AAE5B,EAAA,IAAI,CAAC,IAAM,EAAA;AACT,IAAO,OAAA,IAAA,CAAA;AAAA,GACT;AAEA,EAAI,IAAA,EAAE,wBAAwB,IAAQ,CAAA,EAAA;AACpC,IAAO,OAAA,IAAA,CAAA;AAAA,GACT;AAEA,EAAM,MAAA,OAAA,uBAAc,GAAoB,CAAA;AAAA,IACtC,CAAC,YAAY,WAAW,CAAA;AAAA,IACxB,CAAC,cAAc,aAAa,CAAA;AAAA,IAC5B,CAAC,gBAAgB,gBAAgB,CAAA;AAAA,GAClC,CAAA,CAAA;AACD,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,iBAAkB,EAAA,EAAA,UAAA,EAAY,uBAC7B,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACC,MAAM,IAAK,CAAA,kBAAA;AAAA,MACX,KAAM,EAAA,WAAA;AAAA,MACN,OAAA;AAAA,KAAA;AAAA,GAEJ,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClusterContext.esm.js","sources":["../../../src/components/ClusterContext/ClusterContext.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 */\nimport React, { createContext, useContext, useMemo } from 'react';\nimport useAsyncFn from 'react-use/lib/useAsyncFn';\nimport useDebounce from 'react-use/lib/useDebounce';\n\nimport { useApi } from '@backstage/core-plugin-api';\nimport { ErrorResponseBody } from '@backstage/errors';\nimport { useEntity } from '@backstage/plugin-catalog-react';\n\nimport {\n ANNOTATION_PROVIDER_ID,\n Cluster,\n} from '@backstage-community/plugin-ocm-common';\n\nimport { OcmApiRef } from '../../api';\n\
|
|
1
|
+
{"version":3,"file":"ClusterContext.esm.js","sources":["../../../src/components/ClusterContext/ClusterContext.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 */\nimport React, { createContext, useContext, useMemo } from 'react';\nimport useAsyncFn from 'react-use/lib/useAsyncFn';\nimport useDebounce from 'react-use/lib/useDebounce';\n\nimport { useApi } from '@backstage/core-plugin-api';\nimport { ErrorResponseBody } from '@backstage/errors';\nimport { useEntity } from '@backstage/plugin-catalog-react';\n\nimport {\n ANNOTATION_PROVIDER_ID,\n Cluster,\n} from '@backstage-community/plugin-ocm-common';\n\nimport { OcmApiRef } from '../../api';\n\n/**\n * @public\n */\nexport type ClusterContextType = {\n data: Cluster | null;\n loading: boolean;\n error: Error | null;\n};\n\nconst ClusterContext = createContext<ClusterContextType>(\n {} as ClusterContextType,\n);\n\n/**\n * @public\n */\nexport const ClusterContextProvider = (props: any) => {\n const { entity } = useEntity();\n const ocmApi = useApi(OcmApiRef);\n const providerId = entity.metadata.annotations![ANNOTATION_PROVIDER_ID];\n const [{ value: cluster, loading, error: asyncError }, refresh] = useAsyncFn(\n async () => {\n if (providerId) {\n const cl = await ocmApi.getClusterByName(\n providerId,\n entity.metadata.name,\n );\n return cl;\n }\n return null;\n },\n [providerId, entity.metadata.name],\n { loading: true },\n );\n useDebounce(refresh, 10);\n const isError = Boolean(asyncError || (cluster && 'error' in cluster));\n const error = isError\n ? asyncError ||\n Object.assign(new Error((cluster as ErrorResponseBody)?.error?.message), {\n ...(cluster as ErrorResponseBody)?.error,\n })\n : null;\n\n const value = useMemo(\n () => ({\n data: isError || loading ? null : (cluster as Cluster),\n loading,\n error,\n }),\n [cluster, isError, loading, error],\n );\n\n if (!providerId) {\n return <>{props.children}</>;\n }\n\n return (\n <ClusterContext.Provider value={value}>\n {props.children}\n </ClusterContext.Provider>\n );\n};\n\n/**\n * @public\n */\nexport const useCluster = () => useContext(ClusterContext);\n"],"names":[],"mappings":";;;;;;;;AAuCA,MAAM,cAAiB,GAAA,aAAA;AAAA,EACrB,EAAC;AACH,CAAA,CAAA;AAKa,MAAA,sBAAA,GAAyB,CAAC,KAAe,KAAA;AACpD,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA,CAAA;AAC7B,EAAM,MAAA,MAAA,GAAS,OAAO,SAAS,CAAA,CAAA;AAC/B,EAAA,MAAM,UAAa,GAAA,MAAA,CAAO,QAAS,CAAA,WAAA,CAAa,sBAAsB,CAAA,CAAA;AACtE,EAAM,MAAA,CAAC,EAAE,KAAO,EAAA,OAAA,EAAS,SAAS,KAAO,EAAA,UAAA,EAAc,EAAA,OAAO,CAAI,GAAA,UAAA;AAAA,IAChE,YAAY;AACV,MAAA,IAAI,UAAY,EAAA;AACd,QAAM,MAAA,EAAA,GAAK,MAAM,MAAO,CAAA,gBAAA;AAAA,UACtB,UAAA;AAAA,UACA,OAAO,QAAS,CAAA,IAAA;AAAA,SAClB,CAAA;AACA,QAAO,OAAA,EAAA,CAAA;AAAA,OACT;AACA,MAAO,OAAA,IAAA,CAAA;AAAA,KACT;AAAA,IACA,CAAC,UAAA,EAAY,MAAO,CAAA,QAAA,CAAS,IAAI,CAAA;AAAA,IACjC,EAAE,SAAS,IAAK,EAAA;AAAA,GAClB,CAAA;AACA,EAAA,WAAA,CAAY,SAAS,EAAE,CAAA,CAAA;AACvB,EAAA,MAAM,OAAU,GAAA,OAAA,CAAQ,UAAe,IAAA,OAAA,IAAW,WAAW,OAAQ,CAAA,CAAA;AACrE,EAAM,MAAA,KAAA,GAAQ,OACV,GAAA,UAAA,IACA,MAAO,CAAA,MAAA,CAAO,IAAI,KAAO,CAAA,OAAA,EAA+B,KAAO,EAAA,OAAO,CAAG,EAAA;AAAA,IACvE,GAAI,OAA+B,EAAA,KAAA;AAAA,GACpC,CACD,GAAA,IAAA,CAAA;AAEJ,EAAA,MAAM,KAAQ,GAAA,OAAA;AAAA,IACZ,OAAO;AAAA,MACL,IAAA,EAAM,OAAW,IAAA,OAAA,GAAU,IAAQ,GAAA,OAAA;AAAA,MACnC,OAAA;AAAA,MACA,KAAA;AAAA,KACF,CAAA;AAAA,IACA,CAAC,OAAA,EAAS,OAAS,EAAA,OAAA,EAAS,KAAK,CAAA;AAAA,GACnC,CAAA;AAEA,EAAA,IAAI,CAAC,UAAY,EAAA;AACf,IAAO,uBAAA,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EAAG,MAAM,QAAS,CAAA,CAAA;AAAA,GAC3B;AAEA,EAAA,2CACG,cAAe,CAAA,QAAA,EAAf,EAAwB,KAAA,EAAA,EACtB,MAAM,QACT,CAAA,CAAA;AAEJ,EAAA;AAKa,MAAA,UAAA,GAAa,MAAM,UAAA,CAAW,cAAc;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClusterInfoCard.esm.js","sources":["../../../src/components/ClusterInfoCard/ClusterInfoCard.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 */\nimport React from 'react';\n\nimport { RequirePermission } from '@backstage/plugin-permission-react';\n\nimport { ocmEntityReadPermission } from '@backstage-community/plugin-ocm-common';\n\nimport { useCluster } from '../ClusterContext';\nimport { Status, Update } from '../common';\nimport { TableCardFromData } from '../TableCardFromData';\n\nexport const ClusterInfoCard = () => {\n const { data } = useCluster();\n\n if (!data) {\n return null;\n }\n\n data.openshiftVersion = (\n <Update data={{ version: data.openshiftVersion!, update: data.update! }} />\n ) as any;\n data.status = (<Status status={data.status} />) as any;\n const nameMap = new Map<string, string>([\n ['name', 'Name'],\n ['status', 'Status'],\n ['kubernetesVersion', 'Kubernetes version'],\n ['openshiftId', 'OpenShift ID'],\n ['openshiftVersion', 'OpenShift version'],\n ['platform', 'Platform'],\n ]);\n return (\n <RequirePermission permission={ocmEntityReadPermission}>\n <TableCardFromData data={data} title=\"Cluster Info\" nameMap={nameMap} />\n </RequirePermission>\n );\n};\n"],"names":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"ClusterInfoCard.esm.js","sources":["../../../src/components/ClusterInfoCard/ClusterInfoCard.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 */\nimport React from 'react';\n\nimport { RequirePermission } from '@backstage/plugin-permission-react';\n\nimport { ocmEntityReadPermission } from '@backstage-community/plugin-ocm-common';\n\nimport { useCluster } from '../ClusterContext';\nimport { Status, Update } from '../common';\nimport { TableCardFromData } from '../TableCardFromData';\n\n/**\n * @public\n */\nexport const ClusterInfoCard = () => {\n const { data } = useCluster();\n\n if (!data) {\n return null;\n }\n\n data.openshiftVersion = (\n <Update data={{ version: data.openshiftVersion!, update: data.update! }} />\n ) as any;\n data.status = (<Status status={data.status} />) as any;\n const nameMap = new Map<string, string>([\n ['name', 'Name'],\n ['status', 'Status'],\n ['kubernetesVersion', 'Kubernetes version'],\n ['openshiftId', 'OpenShift ID'],\n ['openshiftVersion', 'OpenShift version'],\n ['platform', 'Platform'],\n ]);\n return (\n <RequirePermission permission={ocmEntityReadPermission}>\n <TableCardFromData data={data} title=\"Cluster Info\" nameMap={nameMap} />\n </RequirePermission>\n );\n};\n"],"names":[],"mappings":";;;;;;;AA4BO,MAAM,kBAAkB,MAAM;AACnC,EAAM,MAAA,EAAE,IAAK,EAAA,GAAI,UAAW,EAAA,CAAA;AAE5B,EAAA,IAAI,CAAC,IAAM,EAAA;AACT,IAAO,OAAA,IAAA,CAAA;AAAA,GACT;AAEA,EAAK,IAAA,CAAA,gBAAA,mBACF,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EAAO,IAAM,EAAA,EAAE,OAAS,EAAA,IAAA,CAAK,gBAAmB,EAAA,MAAA,EAAQ,IAAK,CAAA,MAAA,EAAW,EAAA,CAAA,CAAA;AAE3E,EAAA,IAAA,CAAK,MAAU,mBAAA,KAAA,CAAA,aAAA,CAAC,MAAO,EAAA,EAAA,MAAA,EAAQ,KAAK,MAAQ,EAAA,CAAA,CAAA;AAC5C,EAAM,MAAA,OAAA,uBAAc,GAAoB,CAAA;AAAA,IACtC,CAAC,QAAQ,MAAM,CAAA;AAAA,IACf,CAAC,UAAU,QAAQ,CAAA;AAAA,IACnB,CAAC,qBAAqB,oBAAoB,CAAA;AAAA,IAC1C,CAAC,eAAe,cAAc,CAAA;AAAA,IAC9B,CAAC,oBAAoB,mBAAmB,CAAA;AAAA,IACxC,CAAC,YAAY,UAAU,CAAA;AAAA,GACxB,CAAA,CAAA;AACD,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,iBAAkB,EAAA,EAAA,UAAA,EAAY,uBAC7B,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,qBAAkB,IAAY,EAAA,KAAA,EAAM,cAAe,EAAA,OAAA,EAAkB,CACxE,CAAA,CAAA;AAEJ;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,24 +5,48 @@ import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
|
5
5
|
import { IconComponent } from '@backstage/core-plugin-api';
|
|
6
6
|
import { Cluster } from '@backstage-community/plugin-ocm-common';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
8
11
|
declare const ocmPlugin: _backstage_core_plugin_api.BackstagePlugin<{
|
|
9
12
|
root: _backstage_core_plugin_api.RouteRef<undefined>;
|
|
10
13
|
}, {}, {}>;
|
|
14
|
+
/**
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
11
17
|
declare const OcmPage: ({ logo }: {
|
|
12
18
|
logo?: react.ReactNode;
|
|
13
19
|
}) => react.JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
14
23
|
declare const OcmIcon: IconComponent;
|
|
15
24
|
|
|
25
|
+
/**
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
16
28
|
declare const ClusterAvailableResourceCard: () => any;
|
|
17
29
|
|
|
30
|
+
/**
|
|
31
|
+
* @public
|
|
32
|
+
*/
|
|
18
33
|
type ClusterContextType = {
|
|
19
34
|
data: Cluster | null;
|
|
20
35
|
loading: boolean;
|
|
21
36
|
error: Error | null;
|
|
22
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
23
41
|
declare const ClusterContextProvider: (props: any) => react__default.JSX.Element;
|
|
42
|
+
/**
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
24
45
|
declare const useCluster: () => ClusterContextType;
|
|
25
46
|
|
|
47
|
+
/**
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
26
50
|
declare const ClusterInfoCard: () => react__default.JSX.Element | null;
|
|
27
51
|
|
|
28
|
-
export { ClusterAvailableResourceCard, ClusterContextProvider, ClusterInfoCard, OcmIcon, OcmPage, ocmPlugin, useCluster };
|
|
52
|
+
export { ClusterAvailableResourceCard, ClusterContextProvider, type ClusterContextType, ClusterInfoCard, OcmIcon, OcmPage, ocmPlugin, useCluster };
|
package/dist/plugin.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"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 */\nimport {\n configApiRef,\n createApiFactory,\n createPlugin,\n createRoutableExtension,\n IconComponent,\n identityApiRef,\n} from '@backstage/core-plugin-api';\n\nimport HubOutlinedIcon from '@mui/icons-material/HubOutlined';\n\nimport { OcmApiClient, OcmApiRef } from './api';\nimport { rootRouteRef } from './routes';\n\nexport const ocmPlugin = createPlugin({\n id: 'ocm',\n routes: {\n root: rootRouteRef,\n },\n apis: [\n createApiFactory({\n api: OcmApiRef,\n deps: {\n configApi: configApiRef,\n identityApi: identityApiRef,\n },\n factory: ({ configApi, identityApi }) =>\n new OcmApiClient({ configApi, identityApi }),\n }),\n ],\n});\n\nexport const OcmPage = ocmPlugin.provide(\n createRoutableExtension({\n name: 'OcmPage',\n component: () =>\n import('./components/ClusterStatusPage').then(m => m.ClusterStatusPage),\n mountPoint: rootRouteRef,\n }),\n);\n\nexport const OcmIcon = HubOutlinedIcon as IconComponent;\n"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"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 */\nimport {\n configApiRef,\n createApiFactory,\n createPlugin,\n createRoutableExtension,\n IconComponent,\n identityApiRef,\n} from '@backstage/core-plugin-api';\n\nimport HubOutlinedIcon from '@mui/icons-material/HubOutlined';\n\nimport { OcmApiClient, OcmApiRef } from './api';\nimport { rootRouteRef } from './routes';\n\n/**\n * @public\n */\nexport const ocmPlugin = createPlugin({\n id: 'ocm',\n routes: {\n root: rootRouteRef,\n },\n apis: [\n createApiFactory({\n api: OcmApiRef,\n deps: {\n configApi: configApiRef,\n identityApi: identityApiRef,\n },\n factory: ({ configApi, identityApi }) =>\n new OcmApiClient({ configApi, identityApi }),\n }),\n ],\n});\n\n/**\n * @public\n */\nexport const OcmPage = ocmPlugin.provide(\n createRoutableExtension({\n name: 'OcmPage',\n component: () =>\n import('./components/ClusterStatusPage').then(m => m.ClusterStatusPage),\n mountPoint: rootRouteRef,\n }),\n);\n\n/**\n * @public\n */\nexport const OcmIcon = HubOutlinedIcon as IconComponent;\n"],"names":[],"mappings":";;;;;AAgCO,MAAM,YAAY,YAAa,CAAA;AAAA,EACpC,EAAI,EAAA,KAAA;AAAA,EACJ,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,YAAA;AAAA,GACR;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,gBAAiB,CAAA;AAAA,MACf,GAAK,EAAA,SAAA;AAAA,MACL,IAAM,EAAA;AAAA,QACJ,SAAW,EAAA,YAAA;AAAA,QACX,WAAa,EAAA,cAAA;AAAA,OACf;AAAA,MACA,OAAA,EAAS,CAAC,EAAE,SAAW,EAAA,WAAA,EACrB,KAAA,IAAI,YAAa,CAAA,EAAE,SAAW,EAAA,WAAA,EAAa,CAAA;AAAA,KAC9C,CAAA;AAAA,GACH;AACF,CAAC,EAAA;AAKM,MAAM,UAAU,SAAU,CAAA,OAAA;AAAA,EAC/B,uBAAwB,CAAA;AAAA,IACtB,IAAM,EAAA,SAAA;AAAA,IACN,SAAA,EAAW,MACT,OAAO,6CAAgC,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,iBAAiB,CAAA;AAAA,IACxE,UAAY,EAAA,YAAA;AAAA,GACb,CAAA;AACH,EAAA;AAKO,MAAM,OAAU,GAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage-community/plugin-ocm",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.5",
|
|
4
4
|
"main": "dist/index.esm.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"prettier:fix": "prettier --ignore-unknown --write ."
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@backstage-community/plugin-ocm-common": "^3.6.
|
|
37
|
+
"@backstage-community/plugin-ocm-common": "^3.6.2",
|
|
38
38
|
"@backstage/catalog-model": "^1.7.0",
|
|
39
39
|
"@backstage/core-components": "^0.15.1",
|
|
40
40
|
"@backstage/core-plugin-api": "^1.10.0",
|
|
@@ -68,11 +68,11 @@
|
|
|
68
68
|
"@testing-library/jest-dom": "^6.0.0",
|
|
69
69
|
"@testing-library/react": "^15.0.0",
|
|
70
70
|
"@testing-library/user-event": "14.5.2",
|
|
71
|
-
"@types/node": "18.19.
|
|
71
|
+
"@types/node": "18.19.64",
|
|
72
72
|
"@types/react": "^18.2.58",
|
|
73
73
|
"@types/react-dom": "^18.2.19",
|
|
74
74
|
"cross-fetch": "4.0.0",
|
|
75
|
-
"msw": "1.3.
|
|
75
|
+
"msw": "1.3.5",
|
|
76
76
|
"prettier": "3.3.3",
|
|
77
77
|
"react": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
78
78
|
"react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
|