@k8slens/extensions 5.3.0-git.0f4250d1e6.0 → 5.3.0-git.125a073007.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 (67) hide show
  1. package/dist/src/common/catalog/catalog-entity.d.ts +4 -1
  2. package/dist/src/common/catalog/catalog-run-event.d.ts +30 -0
  3. package/dist/src/common/catalog-entities/kubernetes-cluster.d.ts +9 -1
  4. package/dist/src/common/catalog-entities/web-link.d.ts +2 -0
  5. package/dist/src/common/hotbar-store.d.ts +5 -0
  6. package/dist/src/common/k8s-api/endpoints/crd.api.d.ts +24 -8
  7. package/dist/src/common/k8s-api/endpoints/nodes.api.d.ts +25 -44
  8. package/dist/src/common/k8s-api/kube-object.d.ts +4 -0
  9. package/dist/src/common/kube-helpers.d.ts +9 -14
  10. package/dist/src/common/routes/index.d.ts +1 -0
  11. package/dist/src/common/routes/port-forwards.d.ts +25 -0
  12. package/dist/src/common/user-store/preferences-helpers.d.ts +6 -0
  13. package/dist/src/common/user-store/user-store.d.ts +2 -0
  14. package/dist/src/common/utils/iter.d.ts +16 -9
  15. package/dist/src/extensions/common-api/catalog.d.ts +2 -1
  16. package/dist/src/extensions/extension-api.js +6215 -6198
  17. package/dist/src/extensions/renderer-api/catalog.d.ts +6 -4
  18. package/dist/src/main/cluster.d.ts +0 -1
  19. package/dist/src/main/helm/helm-chart-manager.d.ts +4 -0
  20. package/dist/src/main/helm/helm-repo-manager.d.ts +1 -0
  21. package/dist/src/main/routes/port-forward-route.d.ts +3 -0
  22. package/dist/src/main/shell-session/node-shell-session.d.ts +2 -0
  23. package/dist/src/main/utils/update-channel.d.ts +6 -0
  24. package/dist/src/renderer/api/catalog-entity-registry.d.ts +7 -10
  25. package/dist/src/renderer/components/+apps-helm-charts/helm-chart-details.d.ts +1 -1
  26. package/dist/src/renderer/components/+apps-releases/release-details.d.ts +2 -1
  27. package/dist/src/renderer/components/+catalog/catalog-entity-drawer-menu.d.ts +0 -1
  28. package/dist/src/renderer/components/+catalog/catalog-entity-item.d.ts +1 -1
  29. package/dist/src/renderer/components/+catalog/catalog.d.ts +2 -0
  30. package/dist/src/renderer/components/+catalog/hotbar-toggle-menu-item.d.ts +27 -0
  31. package/dist/src/renderer/components/+config-maps/config-map-details.d.ts +1 -1
  32. package/dist/src/renderer/components/+config-pod-disruption-budgets/pod-disruption-budgets-details.d.ts +1 -1
  33. package/dist/src/renderer/components/+config-resource-quotas/resource-quota-details.d.ts +1 -1
  34. package/dist/src/renderer/components/+config-secrets/secret-details.d.ts +1 -1
  35. package/dist/src/renderer/components/+custom-resources/crd-details.d.ts +1 -1
  36. package/dist/src/renderer/components/+custom-resources/crd-resource-details.d.ts +2 -2
  37. package/dist/src/renderer/components/+entity-settings/entity-settings.d.ts +1 -2
  38. package/dist/src/renderer/components/+events/event-details.d.ts +1 -1
  39. package/dist/src/renderer/components/+events/kube-event-details.d.ts +1 -1
  40. package/dist/src/renderer/components/+network-endpoints/endpoint-details.d.ts +1 -1
  41. package/dist/src/renderer/components/+network-ingresses/ingress-details.d.ts +1 -1
  42. package/dist/src/renderer/components/+network-policies/network-policy-details.d.ts +1 -1
  43. package/dist/src/renderer/{keyboard-shortcuts → components/+network-port-forwards}/index.d.ts +1 -1
  44. package/dist/src/renderer/components/+network-port-forwards/port-forward-menu.d.ts +33 -0
  45. package/dist/src/renderer/components/+network-port-forwards/port-forwards.d.ts +28 -0
  46. package/dist/src/renderer/components/+network-services/service-details.d.ts +1 -1
  47. package/dist/src/renderer/components/+network-services/service-port-component.d.ts +6 -0
  48. package/dist/src/renderer/components/+pod-security-policies/pod-security-policy-details.d.ts +9 -8
  49. package/dist/src/renderer/components/+storage-classes/storage-class-details.d.ts +1 -1
  50. package/dist/src/renderer/components/+workloads-cronjobs/cronjob-details.d.ts +1 -1
  51. package/dist/src/renderer/components/+workloads-pods/pod-container-port.d.ts +6 -0
  52. package/dist/src/renderer/components/+workloads-pods/pod-details-container.d.ts +1 -0
  53. package/dist/src/{common/custom-errors.d.ts → renderer/components/__tests__/nodes.api.test.d.ts} +1 -3
  54. package/dist/src/renderer/components/dock/dock.d.ts +4 -1
  55. package/dist/src/renderer/components/dock/dock.store.d.ts +1 -1
  56. package/dist/src/renderer/components/dock/log-tab.store.d.ts +1 -1
  57. package/dist/src/renderer/components/hotbar/hotbar-entity-icon.d.ts +0 -2
  58. package/dist/src/renderer/components/kube-object-meta/kube-object-meta.d.ts +1 -1
  59. package/dist/src/renderer/components/layout/setting-layout.d.ts +0 -1
  60. package/dist/src/renderer/components/layout/sidebar.d.ts +3 -1
  61. package/dist/src/renderer/components/switch/switcher.d.ts +1 -1
  62. package/dist/src/renderer/navigation/history.d.ts +2 -2
  63. package/dist/src/renderer/port-forward/index.d.ts +23 -0
  64. package/dist/src/renderer/port-forward/port-forward-dialog.d.ts +46 -0
  65. package/dist/src/renderer/port-forward/port-forward-item.d.ts +46 -0
  66. package/dist/src/renderer/port-forward/port-forward.store.d.ts +39 -0
  67. package/package.json +1 -1
@@ -26,5 +26,5 @@ interface Styles extends Partial<Record<SwitchClassKey, string>> {
26
26
  interface Props extends SwitchProps {
27
27
  classes: Styles;
28
28
  }
29
- export declare const Switcher: React.ComponentType<Pick<Props, "name" | "id" | "key" | "value" | "type" | "resource" | "style" | "dir" | "form" | "slot" | "title" | "color" | "className" | "prefix" | "defaultValue" | "hidden" | "ref" | "disabled" | "onDrag" | "onDoubleClick" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClickCapture" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "size" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "autoFocus" | "icon" | "checked" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "readOnly" | "required" | "inputProps" | "action" | "innerRef" | "checkedIcon" | "disableFocusRipple" | "edge" | "buttonRef" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "onFocusVisible" | "TouchRippleProps" | "inputRef"> & import("@material-ui/core/styles").StyledComponentProps<"track" | "checked" | "root" | "thumb" | "focusVisible" | "switchBase">>;
29
+ export declare const Switcher: React.ComponentType<Pick<Props, "name" | "key" | "id" | "value" | "type" | "resource" | "style" | "dir" | "form" | "slot" | "title" | "color" | "className" | "prefix" | "defaultValue" | "hidden" | "ref" | "disabled" | "onDrag" | "onDoubleClick" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClickCapture" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "role" | "size" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "autoFocus" | "icon" | "checked" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "readOnly" | "required" | "inputProps" | "action" | "innerRef" | "checkedIcon" | "disableFocusRipple" | "edge" | "buttonRef" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "onFocusVisible" | "TouchRippleProps" | "inputRef"> & import("@material-ui/core/styles").StyledComponentProps<"track" | "checked" | "root" | "thumb" | "focusVisible" | "switchBase">>;
30
30
  export {};
@@ -20,5 +20,5 @@
20
20
  */
21
21
  import { ObservableSearchParamsOptions } from "mobx-observable-history";
22
22
  export declare const searchParamsOptions: ObservableSearchParamsOptions;
23
- export declare const history: import("history").History<{}>;
24
- export declare const navigation: import("mobx-observable-history").ObservableHistory<{}>;
23
+ export declare const history: import("history").History<unknown>;
24
+ export declare const navigation: import("mobx-observable-history").ObservableHistory<unknown>;
@@ -0,0 +1,23 @@
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 * from "./port-forward.store";
22
+ export * from "./port-forward-item";
23
+ export * from "./port-forward-dialog";
@@ -0,0 +1,46 @@
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 "./port-forward-dialog.scss";
22
+ import { Component } from "react";
23
+ import { DialogProps } from "../components/dialog";
24
+ import type { ForwardedPort } from "./port-forward-item";
25
+ interface Props extends Partial<DialogProps> {
26
+ }
27
+ interface PortForwardDialogOpenOptions {
28
+ openInBrowser: boolean;
29
+ }
30
+ export declare class PortForwardDialog extends Component<Props> {
31
+ ready: boolean;
32
+ currentPort: number;
33
+ desiredPort: number;
34
+ constructor(props: Props);
35
+ static open(portForward: ForwardedPort, options?: PortForwardDialogOpenOptions): void;
36
+ static close(): void;
37
+ get portForward(): ForwardedPort;
38
+ close: () => void;
39
+ onOpen: () => Promise<void>;
40
+ onClose: () => void;
41
+ changePort: (value: string) => void;
42
+ startPortForward: () => Promise<void>;
43
+ renderContents(): JSX.Element;
44
+ render(): JSX.Element;
45
+ }
46
+ export {};
@@ -0,0 +1,46 @@
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 type { ItemObject } from "../../common/item.store";
22
+ export interface ForwardedPort {
23
+ clusterId?: string;
24
+ kind: string;
25
+ namespace: string;
26
+ name: string;
27
+ port: number;
28
+ forwardPort: number;
29
+ }
30
+ export declare class PortForwardItem implements ItemObject {
31
+ clusterId: string;
32
+ kind: string;
33
+ namespace: string;
34
+ name: string;
35
+ port: number;
36
+ forwardPort: number;
37
+ constructor(pf: ForwardedPort);
38
+ getName(): string;
39
+ getNs(): string;
40
+ get id(): number;
41
+ getId(): string;
42
+ getKind(): string;
43
+ getPort(): number;
44
+ getForwardPort(): number;
45
+ getSearchFields(): (string | number)[];
46
+ }
@@ -0,0 +1,39 @@
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 { ItemStore } from "../../common/item.store";
22
+ import { ForwardedPort, PortForwardItem } from "./port-forward-item";
23
+ export declare class PortForwardStore extends ItemStore<PortForwardItem> {
24
+ private storage;
25
+ portForwards: PortForwardItem[];
26
+ constructor();
27
+ private init;
28
+ watch(): import("../utils").ExtendableDisposer;
29
+ loadAll(): Promise<any>;
30
+ reset(): void;
31
+ removeSelectedItems(): Promise<void[]>;
32
+ }
33
+ export declare function addPortForward(portForward: ForwardedPort): Promise<number>;
34
+ export declare function getPortForward(portForward: ForwardedPort): Promise<number>;
35
+ export declare function modifyPortForward(portForward: ForwardedPort, desiredPort: number): Promise<number>;
36
+ export declare function removePortForward(portForward: ForwardedPort): Promise<void>;
37
+ export declare function getPortForwards(): Promise<ForwardedPort[]>;
38
+ export declare function openPortForward(portForward: ForwardedPort): void;
39
+ export declare const portForwardStore: PortForwardStore;
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.0-git.0f4250d1e6.0",
5
+ "version": "5.3.0-git.125a073007.0",
6
6
  "copyright": "© 2021 OpenLens Authors",
7
7
  "license": "MIT",
8
8
  "main": "dist/src/extensions/extension-api.js",