@backstage/plugin-kubernetes-common 0.9.8-next.1 → 0.9.9-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,20 @@
|
|
|
1
1
|
# @backstage/plugin-kubernetes-common
|
|
2
2
|
|
|
3
|
+
## 0.9.9-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8fa8d87: Add Kubernetes Plugin Secrets Accordion with masked secret datas
|
|
8
|
+
|
|
9
|
+
## 0.9.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 1906d37: Updated dependency `@kubernetes/client-node` to `1.4.0`.
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
- @backstage/plugin-permission-common@0.9.3
|
|
16
|
+
- @backstage/catalog-model@1.7.6
|
|
17
|
+
|
|
3
18
|
## 0.9.8-next.1
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JsonValue, JsonObject } from '@backstage/types';
|
|
2
|
-
import { V1Pod, V1Service, V1ConfigMap, V1Deployment, V1LimitRange, V1ResourceQuota, V1ReplicaSet, V2HorizontalPodAutoscaler, V1Job, V1CronJob, V1Ingress, V1StatefulSet, V1DaemonSet, PodStatus
|
|
2
|
+
import { V1Pod, V1Service, V1ConfigMap, V1Secret, V1Deployment, V1LimitRange, V1ResourceQuota, V1ReplicaSet, V2HorizontalPodAutoscaler, V1Job, V1CronJob, V1Ingress, V1StatefulSet, V1DaemonSet, PodStatus } from '@kubernetes/client-node';
|
|
3
3
|
import { Entity } from '@backstage/catalog-model';
|
|
4
4
|
import * as _backstage_plugin_permission_common from '@backstage/plugin-permission-common';
|
|
5
5
|
import { ObjectsByEntityResponse as ObjectsByEntityResponse$1, FetchResponse as FetchResponse$1 } from '@backstage/plugin-kubernetes-common';
|
|
@@ -86,7 +86,7 @@ interface ObjectsByEntityResponse {
|
|
|
86
86
|
/** @public */
|
|
87
87
|
type AuthProviderType = 'google' | 'serviceAccount' | 'aws' | 'azure';
|
|
88
88
|
/** @public */
|
|
89
|
-
type FetchResponse = PodFetchResponse | ServiceFetchResponse | ConfigMapFetchResponse | DeploymentFetchResponse | LimitRangeFetchResponse | ResourceQuotaFetchResponse | ReplicaSetsFetchResponse | HorizontalPodAutoscalersFetchResponse | JobsFetchResponse | CronJobsFetchResponse | IngressesFetchResponse | CustomResourceFetchResponse | StatefulSetsFetchResponse | DaemonSetsFetchResponse | PodStatusFetchResponse | SecretsFetchResponse;
|
|
89
|
+
type FetchResponse = PodFetchResponse | ServiceFetchResponse | ConfigMapFetchResponse | SecretFetchResponse | DeploymentFetchResponse | LimitRangeFetchResponse | ResourceQuotaFetchResponse | ReplicaSetsFetchResponse | HorizontalPodAutoscalersFetchResponse | JobsFetchResponse | CronJobsFetchResponse | IngressesFetchResponse | CustomResourceFetchResponse | StatefulSetsFetchResponse | DaemonSetsFetchResponse | PodStatusFetchResponse | SecretsFetchResponse;
|
|
90
90
|
/** @public */
|
|
91
91
|
interface PodFetchResponse {
|
|
92
92
|
type: 'pods';
|
|
@@ -103,6 +103,11 @@ interface ConfigMapFetchResponse {
|
|
|
103
103
|
resources: Array<V1ConfigMap>;
|
|
104
104
|
}
|
|
105
105
|
/** @public */
|
|
106
|
+
interface SecretFetchResponse {
|
|
107
|
+
type: 'secrets';
|
|
108
|
+
resources: Array<V1Secret>;
|
|
109
|
+
}
|
|
110
|
+
/** @public */
|
|
106
111
|
interface DeploymentFetchResponse {
|
|
107
112
|
type: 'deployments';
|
|
108
113
|
resources: Array<V1Deployment>;
|
|
@@ -212,6 +217,7 @@ interface DeploymentResources {
|
|
|
212
217
|
interface GroupedResponses extends DeploymentResources {
|
|
213
218
|
services: V1Service[];
|
|
214
219
|
configMaps: V1ConfigMap[];
|
|
220
|
+
secrets: V1Secret[];
|
|
215
221
|
ingresses: V1Ingress[];
|
|
216
222
|
jobs: V1Job[];
|
|
217
223
|
cronJobs: V1CronJob[];
|
|
@@ -413,4 +419,4 @@ declare const detectErrors: (objects: ObjectsByEntityResponse$1) => DetectedErro
|
|
|
413
419
|
/** @public */
|
|
414
420
|
declare const groupResponses: (fetchResponse: FetchResponse$1[]) => GroupedResponses;
|
|
415
421
|
|
|
416
|
-
export { ANNOTATION_KUBERNETES_API_SERVER, ANNOTATION_KUBERNETES_API_SERVER_CA, ANNOTATION_KUBERNETES_AUTH_PROVIDER, ANNOTATION_KUBERNETES_AWS_ASSUME_ROLE, ANNOTATION_KUBERNETES_AWS_CLUSTER_ID, ANNOTATION_KUBERNETES_AWS_EXTERNAL_ID, ANNOTATION_KUBERNETES_DASHBOARD_APP, ANNOTATION_KUBERNETES_DASHBOARD_PARAMETERS, ANNOTATION_KUBERNETES_DASHBOARD_URL, ANNOTATION_KUBERNETES_OIDC_TOKEN_PROVIDER, ANNOTATION_KUBERNETES_SKIP_METRICS_LOOKUP, ANNOTATION_KUBERNETES_SKIP_TLS_VERIFY, type AuthProviderType, type ClientContainerStatus, type ClientCurrentResourceUsage, type ClientPodStatus, type ClusterAttributes, type ClusterObjects, type ConfigMapFetchResponse, type CronJobsFetchResponse, type CustomObjectsByEntityRequest, type CustomResourceFetchResponse, type CustomResourceMatcher, type DaemonSetsFetchResponse, type DeploymentFetchResponse, type DeploymentResources, type DetectedError, type DetectedErrorsByCluster, type DocsSolution, type ErrorMapper, type ErrorSeverity, type EventsSolution, type FetchResponse, type GroupedResponses, type HorizontalPodAutoscalersFetchResponse, type IngressesFetchResponse, type JobsFetchResponse, KUBERNETES_ANNOTATION, KUBERNETES_LABEL_SELECTOR_QUERY_ANNOTATION, type KubernetesErrorTypes, type KubernetesFetchError, type KubernetesRequestAuth, type KubernetesRequestBody, type LimitRangeFetchResponse, type LogSolution, type ObjectsByEntityResponse, type PodFetchResponse, type PodStatusFetchResponse, type ProposedFix, type ProposedFixBase, type RawFetchError, type ReplicaSetsFetchResponse, type ResourceQuotaFetchResponse, type ResourceRef, SERVICEACCOUNT_CA_PATH, type SecretsFetchResponse, type ServiceFetchResponse, type StatefulSetsFetchResponse, type StatusError, type WorkloadsByEntityRequest, detectErrors, groupResponses, kubernetesClustersReadPermission, kubernetesPermissions, kubernetesProxyPermission, kubernetesResourcesReadPermission };
|
|
422
|
+
export { ANNOTATION_KUBERNETES_API_SERVER, ANNOTATION_KUBERNETES_API_SERVER_CA, ANNOTATION_KUBERNETES_AUTH_PROVIDER, ANNOTATION_KUBERNETES_AWS_ASSUME_ROLE, ANNOTATION_KUBERNETES_AWS_CLUSTER_ID, ANNOTATION_KUBERNETES_AWS_EXTERNAL_ID, ANNOTATION_KUBERNETES_DASHBOARD_APP, ANNOTATION_KUBERNETES_DASHBOARD_PARAMETERS, ANNOTATION_KUBERNETES_DASHBOARD_URL, ANNOTATION_KUBERNETES_OIDC_TOKEN_PROVIDER, ANNOTATION_KUBERNETES_SKIP_METRICS_LOOKUP, ANNOTATION_KUBERNETES_SKIP_TLS_VERIFY, type AuthProviderType, type ClientContainerStatus, type ClientCurrentResourceUsage, type ClientPodStatus, type ClusterAttributes, type ClusterObjects, type ConfigMapFetchResponse, type CronJobsFetchResponse, type CustomObjectsByEntityRequest, type CustomResourceFetchResponse, type CustomResourceMatcher, type DaemonSetsFetchResponse, type DeploymentFetchResponse, type DeploymentResources, type DetectedError, type DetectedErrorsByCluster, type DocsSolution, type ErrorMapper, type ErrorSeverity, type EventsSolution, type FetchResponse, type GroupedResponses, type HorizontalPodAutoscalersFetchResponse, type IngressesFetchResponse, type JobsFetchResponse, KUBERNETES_ANNOTATION, KUBERNETES_LABEL_SELECTOR_QUERY_ANNOTATION, type KubernetesErrorTypes, type KubernetesFetchError, type KubernetesRequestAuth, type KubernetesRequestBody, type LimitRangeFetchResponse, type LogSolution, type ObjectsByEntityResponse, type PodFetchResponse, type PodStatusFetchResponse, type ProposedFix, type ProposedFixBase, type RawFetchError, type ReplicaSetsFetchResponse, type ResourceQuotaFetchResponse, type ResourceRef, SERVICEACCOUNT_CA_PATH, type SecretFetchResponse, type SecretsFetchResponse, type ServiceFetchResponse, type StatefulSetsFetchResponse, type StatusError, type WorkloadsByEntityRequest, detectErrors, groupResponses, kubernetesClustersReadPermission, kubernetesPermissions, kubernetesProxyPermission, kubernetesResourcesReadPermission };
|
|
@@ -19,6 +19,9 @@ const groupResponses = (fetchResponse) => {
|
|
|
19
19
|
case "configmaps":
|
|
20
20
|
prev.configMaps.push(...next.resources);
|
|
21
21
|
break;
|
|
22
|
+
case "secrets":
|
|
23
|
+
prev.secrets.push(...next.resources);
|
|
24
|
+
break;
|
|
22
25
|
case "horizontalpodautoscalers":
|
|
23
26
|
prev.horizontalPodAutoscalers.push(...next.resources);
|
|
24
27
|
break;
|
|
@@ -49,6 +52,7 @@ const groupResponses = (fetchResponse) => {
|
|
|
49
52
|
deployments: [],
|
|
50
53
|
services: [],
|
|
51
54
|
configMaps: [],
|
|
55
|
+
secrets: [],
|
|
52
56
|
horizontalPodAutoscalers: [],
|
|
53
57
|
ingresses: [],
|
|
54
58
|
jobs: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.cjs.js","sources":["../../src/util/response.ts"],"sourcesContent":["/*\n * Copyright 2020 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 { FetchResponse } from '@backstage/plugin-kubernetes-common';\nimport { GroupedResponses } from '../types';\n\n/** @public */\nexport const groupResponses = (\n fetchResponse: FetchResponse[],\n): GroupedResponses => {\n // TODO this could probably be a lodash groupBy\n return fetchResponse.reduce(\n (prev, next) => {\n switch (next.type) {\n case 'deployments':\n prev.deployments.push(...next.resources);\n break;\n case 'pods':\n prev.pods.push(...next.resources);\n break;\n case 'replicasets':\n prev.replicaSets.push(...next.resources);\n break;\n case 'services':\n prev.services.push(...next.resources);\n break;\n case 'configmaps':\n prev.configMaps.push(...next.resources);\n break;\n case 'horizontalpodautoscalers':\n prev.horizontalPodAutoscalers.push(...next.resources);\n break;\n case 'ingresses':\n prev.ingresses.push(...next.resources);\n break;\n case 'jobs':\n prev.jobs.push(...next.resources);\n break;\n case 'cronjobs':\n prev.cronJobs.push(...next.resources);\n break;\n case 'customresources':\n prev.customResources.push(...next.resources);\n break;\n case 'statefulsets':\n prev.statefulsets.push(...next.resources);\n break;\n case 'daemonsets':\n prev.daemonSets.push(...next.resources);\n break;\n default:\n }\n return prev;\n },\n {\n pods: [],\n replicaSets: [],\n deployments: [],\n services: [],\n configMaps: [],\n horizontalPodAutoscalers: [],\n ingresses: [],\n jobs: [],\n cronJobs: [],\n customResources: [],\n statefulsets: [],\n daemonSets: [],\n } as GroupedResponses,\n );\n};\n"],"names":[],"mappings":";;AAoBO,MAAM,cAAA,GAAiB,CAC5B,aAAA,KACqB;AAErB,EAAA,OAAO,aAAA,CAAc,MAAA;AAAA,IACnB,CAAC,MAAM,IAAA,KAAS;AACd,MAAA,QAAQ,KAAK,IAAA;AAAM,QACjB,KAAK,aAAA;AACH,UAAA,IAAA,CAAK,WAAA,CAAY,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AACvC,UAAA;AAAA,QACF,KAAK,MAAA;AACH,UAAA,IAAA,CAAK,IAAA,CAAK,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AAChC,UAAA;AAAA,QACF,KAAK,aAAA;AACH,UAAA,IAAA,CAAK,WAAA,CAAY,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AACvC,UAAA;AAAA,QACF,KAAK,UAAA;AACH,UAAA,IAA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,UAAU,EAAC;AAAA,MACX,iBAAiB,EAAC;AAAA,MAClB,cAAc,EAAC;AAAA,MACf,YAAY;AAAC;AACf,GACF;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"response.cjs.js","sources":["../../src/util/response.ts"],"sourcesContent":["/*\n * Copyright 2020 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 { FetchResponse } from '@backstage/plugin-kubernetes-common';\nimport { GroupedResponses } from '../types';\n\n/** @public */\nexport const groupResponses = (\n fetchResponse: FetchResponse[],\n): GroupedResponses => {\n // TODO this could probably be a lodash groupBy\n return fetchResponse.reduce(\n (prev, next) => {\n switch (next.type) {\n case 'deployments':\n prev.deployments.push(...next.resources);\n break;\n case 'pods':\n prev.pods.push(...next.resources);\n break;\n case 'replicasets':\n prev.replicaSets.push(...next.resources);\n break;\n case 'services':\n prev.services.push(...next.resources);\n break;\n case 'configmaps':\n prev.configMaps.push(...next.resources);\n break;\n case 'secrets':\n prev.secrets.push(...next.resources);\n break;\n case 'horizontalpodautoscalers':\n prev.horizontalPodAutoscalers.push(...next.resources);\n break;\n case 'ingresses':\n prev.ingresses.push(...next.resources);\n break;\n case 'jobs':\n prev.jobs.push(...next.resources);\n break;\n case 'cronjobs':\n prev.cronJobs.push(...next.resources);\n break;\n case 'customresources':\n prev.customResources.push(...next.resources);\n break;\n case 'statefulsets':\n prev.statefulsets.push(...next.resources);\n break;\n case 'daemonsets':\n prev.daemonSets.push(...next.resources);\n break;\n default:\n }\n return prev;\n },\n {\n pods: [],\n replicaSets: [],\n deployments: [],\n services: [],\n configMaps: [],\n secrets: [],\n horizontalPodAutoscalers: [],\n ingresses: [],\n jobs: [],\n cronJobs: [],\n customResources: [],\n statefulsets: [],\n daemonSets: [],\n } as GroupedResponses,\n );\n};\n"],"names":[],"mappings":";;AAoBO,MAAM,cAAA,GAAiB,CAC5B,aAAA,KACqB;AAErB,EAAA,OAAO,aAAA,CAAc,MAAA;AAAA,IACnB,CAAC,MAAM,IAAA,KAAS;AACd,MAAA,QAAQ,KAAK,IAAA;AAAM,QACjB,KAAK,aAAA;AACH,UAAA,IAAA,CAAK,WAAA,CAAY,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AACvC,UAAA;AAAA,QACF,KAAK,MAAA;AACH,UAAA,IAAA,CAAK,IAAA,CAAK,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AAChC,UAAA;AAAA,QACF,KAAK,aAAA;AACH,UAAA,IAAA,CAAK,WAAA,CAAY,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AACvC,UAAA;AAAA,QACF,KAAK,UAAA;AACH,UAAA,IAAA,CAAK,QAAA,CAAS,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AACpC,UAAA;AAAA,QACF,KAAK,YAAA;AACH,UAAA,IAAA,CAAK,UAAA,CAAW,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AACtC,UAAA;AAAA,QACF,KAAK,SAAA;AACH,UAAA,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AACnC,UAAA;AAAA,QACF,KAAK,0BAAA;AACH,UAAA,IAAA,CAAK,wBAAA,CAAyB,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AACpD,UAAA;AAAA,QACF,KAAK,WAAA;AACH,UAAA,IAAA,CAAK,SAAA,CAAU,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AACrC,UAAA;AAAA,QACF,KAAK,MAAA;AACH,UAAA,IAAA,CAAK,IAAA,CAAK,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AAChC,UAAA;AAAA,QACF,KAAK,UAAA;AACH,UAAA,IAAA,CAAK,QAAA,CAAS,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AACpC,UAAA;AAAA,QACF,KAAK,iBAAA;AACH,UAAA,IAAA,CAAK,eAAA,CAAgB,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AAC3C,UAAA;AAAA,QACF,KAAK,cAAA;AACH,UAAA,IAAA,CAAK,YAAA,CAAa,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AACxC,UAAA;AAAA,QACF,KAAK,YAAA;AACH,UAAA,IAAA,CAAK,UAAA,CAAW,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AACtC,UAAA;AACF;AAEF,MAAA,OAAO,IAAA;AAAA,IACT,CAAA;AAAA,IACA;AAAA,MACE,MAAM,EAAC;AAAA,MACP,aAAa,EAAC;AAAA,MACd,aAAa,EAAC;AAAA,MACd,UAAU,EAAC;AAAA,MACX,YAAY,EAAC;AAAA,MACb,SAAS,EAAC;AAAA,MACV,0BAA0B,EAAC;AAAA,MAC3B,WAAW,EAAC;AAAA,MACZ,MAAM,EAAC;AAAA,MACP,UAAU,EAAC;AAAA,MACX,iBAAiB,EAAC;AAAA,MAClB,cAAc,EAAC;AAAA,MACf,YAAY;AAAC;AACf,GACF;AACF;;;;"}
|
|
@@ -17,6 +17,9 @@ const groupResponses = (fetchResponse) => {
|
|
|
17
17
|
case "configmaps":
|
|
18
18
|
prev.configMaps.push(...next.resources);
|
|
19
19
|
break;
|
|
20
|
+
case "secrets":
|
|
21
|
+
prev.secrets.push(...next.resources);
|
|
22
|
+
break;
|
|
20
23
|
case "horizontalpodautoscalers":
|
|
21
24
|
prev.horizontalPodAutoscalers.push(...next.resources);
|
|
22
25
|
break;
|
|
@@ -47,6 +50,7 @@ const groupResponses = (fetchResponse) => {
|
|
|
47
50
|
deployments: [],
|
|
48
51
|
services: [],
|
|
49
52
|
configMaps: [],
|
|
53
|
+
secrets: [],
|
|
50
54
|
horizontalPodAutoscalers: [],
|
|
51
55
|
ingresses: [],
|
|
52
56
|
jobs: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.esm.js","sources":["../../src/util/response.ts"],"sourcesContent":["/*\n * Copyright 2020 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 { FetchResponse } from '@backstage/plugin-kubernetes-common';\nimport { GroupedResponses } from '../types';\n\n/** @public */\nexport const groupResponses = (\n fetchResponse: FetchResponse[],\n): GroupedResponses => {\n // TODO this could probably be a lodash groupBy\n return fetchResponse.reduce(\n (prev, next) => {\n switch (next.type) {\n case 'deployments':\n prev.deployments.push(...next.resources);\n break;\n case 'pods':\n prev.pods.push(...next.resources);\n break;\n case 'replicasets':\n prev.replicaSets.push(...next.resources);\n break;\n case 'services':\n prev.services.push(...next.resources);\n break;\n case 'configmaps':\n prev.configMaps.push(...next.resources);\n break;\n case 'horizontalpodautoscalers':\n prev.horizontalPodAutoscalers.push(...next.resources);\n break;\n case 'ingresses':\n prev.ingresses.push(...next.resources);\n break;\n case 'jobs':\n prev.jobs.push(...next.resources);\n break;\n case 'cronjobs':\n prev.cronJobs.push(...next.resources);\n break;\n case 'customresources':\n prev.customResources.push(...next.resources);\n break;\n case 'statefulsets':\n prev.statefulsets.push(...next.resources);\n break;\n case 'daemonsets':\n prev.daemonSets.push(...next.resources);\n break;\n default:\n }\n return prev;\n },\n {\n pods: [],\n replicaSets: [],\n deployments: [],\n services: [],\n configMaps: [],\n horizontalPodAutoscalers: [],\n ingresses: [],\n jobs: [],\n cronJobs: [],\n customResources: [],\n statefulsets: [],\n daemonSets: [],\n } as GroupedResponses,\n );\n};\n"],"names":[],"mappings":"AAoBO,MAAM,cAAA,GAAiB,CAC5B,aAAA,KACqB;AAErB,EAAA,OAAO,aAAA,CAAc,MAAA;AAAA,IACnB,CAAC,MAAM,IAAA,KAAS;AACd,MAAA,QAAQ,KAAK,IAAA;AAAM,QACjB,KAAK,aAAA;AACH,UAAA,IAAA,CAAK,WAAA,CAAY,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AACvC,UAAA;AAAA,QACF,KAAK,MAAA;AACH,UAAA,IAAA,CAAK,IAAA,CAAK,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AAChC,UAAA;AAAA,QACF,KAAK,aAAA;AACH,UAAA,IAAA,CAAK,WAAA,CAAY,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AACvC,UAAA;AAAA,QACF,KAAK,UAAA;AACH,UAAA,IAAA,CAAK,QAAA,CAAS,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AACpC,UAAA;AAAA,QACF,KAAK,YAAA;AACH,UAAA,IAAA,CAAK,UAAA,CAAW,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AACtC,UAAA;AAAA,QACF,KAAK,0BAAA;AACH,UAAA,IAAA,CAAK,wBAAA,CAAyB,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AACpD,UAAA;AAAA,QACF,KAAK,WAAA;AACH,UAAA,IAAA,CAAK,SAAA,CAAU,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AACrC,UAAA;AAAA,QACF,KAAK,MAAA;AACH,UAAA,IAAA,CAAK,IAAA,CAAK,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AAChC,UAAA;AAAA,QACF,KAAK,UAAA;AACH,UAAA,IAAA,CAAK,QAAA,CAAS,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AACpC,UAAA;AAAA,QACF,KAAK,iBAAA;AACH,UAAA,IAAA,CAAK,eAAA,CAAgB,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AAC3C,UAAA;AAAA,QACF,KAAK,cAAA;AACH,UAAA,IAAA,CAAK,YAAA,CAAa,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AACxC,UAAA;AAAA,QACF,KAAK,YAAA;AACH,UAAA,IAAA,CAAK,UAAA,CAAW,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AACtC,UAAA;AACF;AAEF,MAAA,OAAO,IAAA;AAAA,IACT,CAAA;AAAA,IACA;AAAA,MACE,MAAM,EAAC;AAAA,MACP,aAAa,EAAC;AAAA,MACd,aAAa,EAAC;AAAA,MACd,UAAU,EAAC;AAAA,MACX,YAAY,EAAC;AAAA,MACb,0BAA0B,EAAC;AAAA,MAC3B,WAAW,EAAC;AAAA,MACZ,MAAM,EAAC;AAAA,MACP,UAAU,EAAC;AAAA,MACX,iBAAiB,EAAC;AAAA,MAClB,cAAc,EAAC;AAAA,MACf,YAAY;AAAC;AACf,GACF;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"response.esm.js","sources":["../../src/util/response.ts"],"sourcesContent":["/*\n * Copyright 2020 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 { FetchResponse } from '@backstage/plugin-kubernetes-common';\nimport { GroupedResponses } from '../types';\n\n/** @public */\nexport const groupResponses = (\n fetchResponse: FetchResponse[],\n): GroupedResponses => {\n // TODO this could probably be a lodash groupBy\n return fetchResponse.reduce(\n (prev, next) => {\n switch (next.type) {\n case 'deployments':\n prev.deployments.push(...next.resources);\n break;\n case 'pods':\n prev.pods.push(...next.resources);\n break;\n case 'replicasets':\n prev.replicaSets.push(...next.resources);\n break;\n case 'services':\n prev.services.push(...next.resources);\n break;\n case 'configmaps':\n prev.configMaps.push(...next.resources);\n break;\n case 'secrets':\n prev.secrets.push(...next.resources);\n break;\n case 'horizontalpodautoscalers':\n prev.horizontalPodAutoscalers.push(...next.resources);\n break;\n case 'ingresses':\n prev.ingresses.push(...next.resources);\n break;\n case 'jobs':\n prev.jobs.push(...next.resources);\n break;\n case 'cronjobs':\n prev.cronJobs.push(...next.resources);\n break;\n case 'customresources':\n prev.customResources.push(...next.resources);\n break;\n case 'statefulsets':\n prev.statefulsets.push(...next.resources);\n break;\n case 'daemonsets':\n prev.daemonSets.push(...next.resources);\n break;\n default:\n }\n return prev;\n },\n {\n pods: [],\n replicaSets: [],\n deployments: [],\n services: [],\n configMaps: [],\n secrets: [],\n horizontalPodAutoscalers: [],\n ingresses: [],\n jobs: [],\n cronJobs: [],\n customResources: [],\n statefulsets: [],\n daemonSets: [],\n } as GroupedResponses,\n );\n};\n"],"names":[],"mappings":"AAoBO,MAAM,cAAA,GAAiB,CAC5B,aAAA,KACqB;AAErB,EAAA,OAAO,aAAA,CAAc,MAAA;AAAA,IACnB,CAAC,MAAM,IAAA,KAAS;AACd,MAAA,QAAQ,KAAK,IAAA;AAAM,QACjB,KAAK,aAAA;AACH,UAAA,IAAA,CAAK,WAAA,CAAY,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AACvC,UAAA;AAAA,QACF,KAAK,MAAA;AACH,UAAA,IAAA,CAAK,IAAA,CAAK,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;AAChC,UAAA;AAAA,QACF,KAAK,aAAA;AACH,UAAA,IAAA,CAAK,WAAA,CAAY,IAAA,CAAK,GAAG,IAAA,CAAK,SAAS,CAAA;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Aa,EAAC;AAAA,MACd,aAAa,EAAC;AAAA,MACd,UAAU,EAAC;AAAA,MACX,YAAY,EAAC;AAAA,MACb,SAAS,EAAC;AAAA,MACV,0BAA0B,EAAC;AAAA,MAC3B,WAAW,EAAC;AAAA,MACZ,MAAM,EAAC;AAAA,MACP,UAAU,EAAC;AAAA,MACX,iBAAiB,EAAC;AAAA,MAClB,cAAc,EAAC;AAAA,MACf,YAAY;AAAC;AACf,GACF;AACF;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-kubernetes-common",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.9-next.0",
|
|
4
4
|
"description": "Common functionalities for kubernetes, to be shared between kubernetes and kubernetes-backend plugin",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "common-library",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
]
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@backstage/catalog-model": "1.7.6
|
|
56
|
-
"@backstage/plugin-permission-common": "0.9.3
|
|
55
|
+
"@backstage/catalog-model": "1.7.6",
|
|
56
|
+
"@backstage/plugin-permission-common": "0.9.3",
|
|
57
57
|
"@backstage/types": "1.2.2",
|
|
58
58
|
"@kubernetes/client-node": "1.4.0",
|
|
59
59
|
"kubernetes-models": "^4.3.1",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"luxon": "^3.0.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@backstage/cli": "0.34.
|
|
64
|
+
"@backstage/cli": "0.34.6-next.1"
|
|
65
65
|
},
|
|
66
66
|
"typesVersions": {
|
|
67
67
|
"*": {
|