@k8slens/extensions 5.3.1-git.bb30bdc750.0 → 5.3.1-git.c0a0127d2d.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 (66) hide show
  1. package/dist/src/common/cluster-types.d.ts +5 -1
  2. package/dist/src/common/ipc/update-available.ipc.d.ts +2 -0
  3. package/dist/src/common/k8s-api/endpoints/daemon-set.api.d.ts +2 -5
  4. package/dist/src/common/k8s-api/endpoints/deployment.api.d.ts +2 -5
  5. package/dist/src/common/k8s-api/endpoints/job.api.d.ts +2 -5
  6. package/dist/src/common/k8s-api/endpoints/network-policy.api.d.ts +72 -32
  7. package/dist/src/common/k8s-api/endpoints/nodes.api.d.ts +6 -6
  8. package/dist/src/common/k8s-api/endpoints/persistent-volume-claims.api.d.ts +3 -16
  9. package/dist/src/common/k8s-api/endpoints/poddisruptionbudget.api.d.ts +2 -6
  10. package/dist/src/common/k8s-api/endpoints/replica-set.api.d.ts +2 -5
  11. package/dist/src/common/k8s-api/endpoints/stateful-set.api.d.ts +2 -5
  12. package/dist/src/common/k8s-api/kube-api-parse.d.ts +2 -2
  13. package/dist/src/common/k8s-api/kube-api.d.ts +58 -30
  14. package/dist/src/common/k8s-api/kube-json-api.d.ts +1 -2
  15. package/dist/src/common/k8s-api/kube-object.d.ts +22 -0
  16. package/dist/src/common/protocol-handler/error.d.ts +3 -3
  17. package/dist/src/common/protocol-handler/router.d.ts +5 -5
  18. package/dist/src/common/utils/readableStream.d.ts +2 -2
  19. package/dist/src/extensions/extension-api.js +183 -65
  20. package/dist/src/extensions/extension-compatibility.d.ts +3 -1
  21. package/dist/src/extensions/registries/status-bar-registry.d.ts +6 -0
  22. package/dist/src/extensions/renderer-api/k8s-api.d.ts +1 -0
  23. package/dist/src/main/cluster-manager.d.ts +1 -1
  24. package/dist/src/main/cluster.d.ts +3 -7
  25. package/dist/src/main/context-handler.d.ts +8 -1
  26. package/dist/src/main/kube-auth-proxy.d.ts +5 -7
  27. package/dist/src/main/kubeconfig-manager.d.ts +16 -4
  28. package/dist/src/main/lens-proxy.d.ts +8 -1
  29. package/dist/src/main/menu.d.ts +6 -1
  30. package/dist/src/main/protocol-handler/router.d.ts +3 -3
  31. package/dist/src/main/window-manager.d.ts +3 -0
  32. package/dist/src/renderer/api/terminal-api.d.ts +0 -2
  33. package/dist/src/renderer/{utils/copyToClipboard.d.ts → components/+network-policies/__tests__/network-policy-details.test.d.ts} +1 -7
  34. package/dist/src/renderer/components/+network-policies/network-policy-details.d.ts +8 -4
  35. package/dist/src/renderer/components/+nodes/nodes.d.ts +2 -1
  36. package/dist/src/renderer/components/avatar/__tests__/avatar.test.d.ts +21 -0
  37. package/dist/src/renderer/components/avatar/avatar.d.ts +7 -8
  38. package/dist/src/renderer/components/{clipboard → avatar}/index.d.ts +1 -1
  39. package/dist/src/renderer/components/cluster-manager/active-hotbar-name.d.ts +21 -0
  40. package/dist/src/renderer/components/cluster-manager/bottom-bar.d.ts +0 -1
  41. package/dist/src/renderer/components/dialog/dialog.d.ts +1 -0
  42. package/dist/src/renderer/components/dock/install-chart.d.ts +0 -1
  43. package/dist/src/renderer/components/drawer/drawer.d.ts +14 -3
  44. package/dist/src/renderer/components/hotbar/hotbar-entity-icon.d.ts +3 -3
  45. package/dist/src/renderer/components/hotbar/hotbar-icon.d.ts +3 -10
  46. package/dist/src/renderer/components/kube-object-menu/dependencies/api-manager.injectable.d.ts +24 -0
  47. package/dist/src/renderer/components/kube-object-menu/dependencies/cluster-name.injectable.d.ts +27 -0
  48. package/dist/src/renderer/components/kube-object-menu/dependencies/cluster.injectable.d.ts +4 -0
  49. package/dist/src/renderer/components/kube-object-menu/dependencies/edit-resource-tab.injectable.d.ts +24 -0
  50. package/dist/src/renderer/components/kube-object-menu/dependencies/hide-details.injectable.d.ts +24 -0
  51. package/dist/src/renderer/components/kube-object-menu/dependencies/kube-object-menu-items/get-kube-object-menu-items.d.ts +29 -0
  52. package/dist/src/renderer/components/kube-object-menu/dependencies/kube-object-menu-items/kube-object-menu-items.injectable.d.ts +24 -0
  53. package/dist/src/renderer/components/kube-object-menu/dependencies/kube-object-menu-items/kube-object-menu-registry.injectable.d.ts +24 -0
  54. package/dist/src/renderer/components/kube-object-menu/index.d.ts +2 -1
  55. package/dist/src/renderer/components/kube-object-menu/kube-object-menu-container.d.ts +2 -0
  56. package/dist/src/renderer/components/kube-object-menu/kube-object-menu.d.ts +14 -4
  57. package/dist/src/renderer/components/kube-object-menu/kube-object-menu.injectable.d.ts +5 -0
  58. package/dist/src/renderer/components/kube-object-menu/kube-object-menu.test.d.ts +21 -0
  59. package/dist/src/renderer/components/kubeconfig-dialog/kubeconfig-dialog.d.ts +0 -1
  60. package/dist/src/renderer/components/layout/__tests__/topbar-win-linux.test.d.ts +21 -0
  61. package/dist/src/renderer/components/resizing-anchor/resizing-anchor.d.ts +3 -1
  62. package/dist/src/renderer/components/{clipboard/clipboard.d.ts → test-utils/renderFor.d.ts} +6 -16
  63. package/dist/src/renderer/initializers/index.d.ts +1 -0
  64. package/dist/src/renderer/initializers/status-bar-registry.d.ts +21 -0
  65. package/dist/src/renderer/utils/index.d.ts +0 -1
  66. package/package.json +1 -1
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Copyright (c) 2021 OpenLens Authors
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ * this software and associated documentation files (the "Software"), to deal in
6
+ * the Software without restriction, including without limitation the rights to
7
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ * the Software, and to permit persons to whom the Software is furnished to do so,
9
+ * subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ */
21
+ import { Injectable } from "@ogre-tools/injectable";
22
+ import { InstantiationParameter, Dependencies, getKubeObjectMenuItems } from "./get-kube-object-menu-items";
23
+ declare const kubeObjectMenuItemsInjectable: Injectable<ReturnType<typeof getKubeObjectMenuItems>, Dependencies, InstantiationParameter>;
24
+ export default kubeObjectMenuItemsInjectable;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Copyright (c) 2021 OpenLens Authors
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ * this software and associated documentation files (the "Software"), to deal in
6
+ * the Software without restriction, including without limitation the rights to
7
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ * the Software, and to permit persons to whom the Software is furnished to do so,
9
+ * subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ */
21
+ import { KubeObjectMenuRegistry } from "../../../../../extensions/registries";
22
+ import type { Injectable } from "@ogre-tools/injectable";
23
+ declare const kubeObjectMenuRegistryInjectable: Injectable<KubeObjectMenuRegistry>;
24
+ export default kubeObjectMenuRegistryInjectable;
@@ -18,4 +18,5 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
- export * from "./kube-object-menu";
21
+ export type { KubeObjectMenuProps } from "./kube-object-menu";
22
+ export { KubeObjectMenu } from "./kube-object-menu-container";
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const KubeObjectMenu: import("react").FC<import("./kube-object-menu").KubeObjectMenuProps<import("../../../common/k8s-api/kube-object").KubeObject<import("../../../common/k8s-api/kube-object").KubeObjectMetadata, any, any>>>;
@@ -20,13 +20,23 @@
20
20
  */
21
21
  import React from "react";
22
22
  import type { KubeObject } from "../../../common/k8s-api/kube-object";
23
- import { MenuActionsProps } from "../menu/menu-actions";
24
- export interface KubeObjectMenuProps<T> extends MenuActionsProps {
25
- object: T | null | undefined;
23
+ import { MenuActionsProps } from "../menu";
24
+ import type { ApiManager } from "../../../common/k8s-api/api-manager";
25
+ export interface KubeObjectMenuDependencies<TKubeObject> {
26
+ apiManager: ApiManager;
27
+ kubeObjectMenuItems: React.ElementType[];
28
+ clusterName: string;
29
+ hideDetails: () => void;
30
+ editResourceTab: (kubeObject: TKubeObject) => void;
31
+ }
32
+ export interface KubeObjectMenuProps<TKubeObject> extends MenuActionsProps {
33
+ object: TKubeObject | null | undefined;
26
34
  editable?: boolean;
27
35
  removable?: boolean;
28
36
  }
29
- export declare class KubeObjectMenu<T extends KubeObject> extends React.Component<KubeObjectMenuProps<T>> {
37
+ export interface KubeObjectMenuPropsAndDependencies<TKubeObject> extends KubeObjectMenuProps<TKubeObject>, KubeObjectMenuDependencies<TKubeObject> {
38
+ }
39
+ export declare class KubeObjectMenu<TKubeObject extends KubeObject> extends React.Component<KubeObjectMenuPropsAndDependencies<TKubeObject>> {
30
40
  get store(): import("../../../common/k8s-api/kube-object.store").KubeObjectStore<KubeObject<import("../../../common/k8s-api/kube-object").KubeObjectMetadata, any, any>>;
31
41
  get isEditable(): boolean;
32
42
  get isRemovable(): boolean;
@@ -0,0 +1,5 @@
1
+ import { KubeObjectMenuDependencies, KubeObjectMenuProps } from "./kube-object-menu";
2
+ import type { KubeObject } from "../../../common/k8s-api/kube-object";
3
+ import { Injectable } from "@ogre-tools/injectable";
4
+ declare const KubeObjectMenuInjectable: Injectable<JSX.Element, KubeObjectMenuDependencies<KubeObject>, KubeObjectMenuProps<KubeObject>>;
5
+ export default KubeObjectMenuInjectable;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Copyright (c) 2021 OpenLens Authors
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ * this software and associated documentation files (the "Software"), to deal in
6
+ * the Software without restriction, including without limitation the rights to
7
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ * the Software, and to permit persons to whom the Software is furnished to do so,
9
+ * subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ */
21
+ import "@testing-library/jest-dom/extend-expect";
@@ -28,7 +28,6 @@ interface IKubeconfigDialogData {
28
28
  interface Props extends Partial<DialogProps> {
29
29
  }
30
30
  export declare class KubeConfigDialog extends React.Component<Props> {
31
- configTextArea: HTMLTextAreaElement;
32
31
  config: string;
33
32
  constructor(props: Props);
34
33
  static open(data: IKubeconfigDialogData): void;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Copyright (c) 2021 OpenLens Authors
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ * this software and associated documentation files (the "Software"), to deal in
6
+ * the Software without restriction, including without limitation the rights to
7
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ * the Software, and to permit persons to whom the Software is furnished to do so,
9
+ * subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ */
21
+ import "@testing-library/jest-dom/extend-expect";
@@ -97,7 +97,9 @@ interface Position {
97
97
  }
98
98
  export declare class ResizingAnchor extends React.PureComponent<Props> {
99
99
  lastMouseEvent?: MouseEvent;
100
- ref?: React.RefObject<HTMLDivElement>;
100
+ ref: React.RefObject<HTMLDivElement>;
101
+ isDragging: boolean;
102
+ wasDragging: boolean;
101
103
  static defaultProps: {
102
104
  onStart: typeof noop;
103
105
  onDrag: typeof noop;
@@ -18,20 +18,10 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
- import "./clipboard.scss";
22
21
  import React from "react";
23
- export interface CopyToClipboardProps {
24
- resetSelection?: boolean;
25
- showNotification?: boolean;
26
- cssSelectorLimit?: string;
27
- getNotificationMessage?(copiedText: string): React.ReactNode;
28
- }
29
- export declare const defaultProps: Partial<CopyToClipboardProps>;
30
- export declare class Clipboard extends React.Component<CopyToClipboardProps> {
31
- static displayName: string;
32
- static defaultProps: object;
33
- get rootElem(): HTMLElement;
34
- get rootReactElem(): React.ReactElement<React.HTMLProps<any>>;
35
- onClick(evt: React.MouseEvent): void;
36
- render(): React.ReactElement<React.HTMLProps<any>, string | React.JSXElementConstructor<any>>;
37
- }
22
+ import { RenderResult } from "@testing-library/react";
23
+ import type { ConfigurableDependencyInjectionContainer } from "@ogre-tools/injectable";
24
+ export declare type DiRender = (ui: React.ReactElement) => RenderResult;
25
+ declare type DiRenderFor = (di: ConfigurableDependencyInjectionContainer) => DiRender;
26
+ export declare const renderFor: DiRenderFor;
27
+ export {};
@@ -29,3 +29,4 @@ export * from "./registries";
29
29
  export * from "./welcome-menu-registry";
30
30
  export * from "./workloads-overview-detail-registry";
31
31
  export * from "./catalog-category-registry";
32
+ export * from "./status-bar-registry";
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Copyright (c) 2021 OpenLens Authors
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ * this software and associated documentation files (the "Software"), to deal in
6
+ * the Software without restriction, including without limitation the rights to
7
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ * the Software, and to permit persons to whom the Software is furnished to do so,
9
+ * subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ */
21
+ export declare function initStatusBarRegistry(): void;
@@ -20,7 +20,6 @@
20
20
  */
21
21
  export * from "../../common/utils";
22
22
  export * from "../../common/event-emitter";
23
- export * from "./copyToClipboard";
24
23
  export * from "./createStorage";
25
24
  export * from "./cssNames";
26
25
  export * from "./cssVar";
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@k8slens/extensions",
3
3
  "productName": "OpenLens extensions",
4
4
  "description": "OpenLens - Open Source Kubernetes IDE: extensions",
5
- "version": "5.3.1-git.bb30bdc750.0",
5
+ "version": "5.3.1-git.c0a0127d2d.0",
6
6
  "copyright": "© 2021 OpenLens Authors",
7
7
  "license": "MIT",
8
8
  "main": "dist/src/extensions/extension-api.js",