@k8slens/extensions 5.2.3 → 5.3.0-git.07c8177a97.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/catalog/catalog-category-registry.d.ts +9 -0
  2. package/dist/src/common/catalog/catalog-entity.d.ts +18 -0
  3. package/dist/src/common/catalog/catalog-run-event.d.ts +30 -0
  4. package/dist/src/common/catalog-entities/__tests__/kubernetes-cluster.test.d.ts +1 -0
  5. package/dist/src/common/k8s-api/endpoints/resource-applier.api.d.ts +4 -4
  6. package/dist/src/common/k8s-api/kube-api.d.ts +20 -2
  7. package/dist/src/common/k8s-api/kube-object.d.ts +18 -1
  8. package/dist/src/common/k8s-api/kube-object.store.d.ts +3 -0
  9. package/dist/src/common/routes/catalog.d.ts +2 -0
  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 +1 -0
  13. package/dist/src/common/user-store/user-store.d.ts +1 -0
  14. package/dist/src/extensions/extension-api.js +3313 -354
  15. package/dist/src/extensions/lens-renderer-extension.d.ts +9 -2
  16. package/dist/src/extensions/main-api/k8s-api.d.ts +2 -2
  17. package/dist/src/extensions/registries/command-registry.d.ts +2 -2
  18. package/dist/src/extensions/renderer-api/catalog.d.ts +11 -0
  19. package/dist/src/extensions/renderer-api/k8s-api.d.ts +2 -2
  20. package/dist/src/main/{routes/utils/index.d.ts → __test__/lens-proxy.test.d.ts} +1 -1
  21. package/dist/src/main/context-handler.d.ts +1 -1
  22. package/dist/src/main/lens-proxy.d.ts +1 -0
  23. package/dist/src/main/resource-applier.d.ts +9 -0
  24. package/dist/src/main/routes/port-forward-route.d.ts +3 -0
  25. package/dist/src/main/routes/resource-applier-route.d.ts +1 -0
  26. package/dist/src/main/utils/__test__/update-channel.test.d.ts +21 -0
  27. package/dist/src/main/utils/http-responses.d.ts +20 -1
  28. package/dist/src/main/{routes/utils → utils}/parse-query.d.ts +0 -0
  29. package/dist/src/main/utils/update-channel.d.ts +21 -0
  30. package/dist/src/renderer/api/catalog-category-registry.d.ts +1 -0
  31. package/dist/src/renderer/api/catalog-entity-registry.d.ts +20 -0
  32. package/dist/src/renderer/bootstrap.d.ts +1 -1
  33. package/dist/src/renderer/components/+add-cluster/add-cluster.d.ts +1 -1
  34. package/dist/src/renderer/components/+catalog/__tests__/catalog-add-button.test.d.ts +1 -0
  35. package/dist/src/renderer/components/+catalog/catalog-entity-details.d.ts +1 -1
  36. package/dist/src/renderer/components/+catalog/catalog-entity-drawer-menu.d.ts +1 -1
  37. package/dist/src/renderer/components/+catalog/catalog-entity-item.d.ts +23 -0
  38. package/dist/src/renderer/components/+catalog/catalog-entity.store.d.ts +7 -23
  39. package/dist/src/renderer/components/+catalog/catalog-menu.d.ts +1 -1
  40. package/dist/src/renderer/components/+catalog/catalog.d.ts +6 -1
  41. package/dist/src/renderer/components/+catalog/catalog.test.d.ts +21 -0
  42. package/dist/src/renderer/components/+entity-settings/entity-settings.d.ts +0 -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-port-component.d.ts +6 -0
  47. package/dist/src/renderer/components/+workloads-pods/pod-container-port.d.ts +6 -0
  48. package/dist/src/renderer/components/+workloads-pods/pod-details-container.d.ts +1 -0
  49. package/dist/src/renderer/components/activate-entity-command/activate-entity-command.d.ts +30 -0
  50. package/dist/src/renderer/components/activate-entity-command/index.d.ts +21 -0
  51. package/dist/src/renderer/components/app.d.ts +1 -1
  52. package/dist/src/renderer/components/dock/create-resource.d.ts +1 -1
  53. package/dist/src/renderer/components/dock/dock.store.d.ts +1 -1
  54. package/dist/src/renderer/components/dock/edit-resource.store.d.ts +2 -0
  55. package/dist/src/renderer/components/dock/log-tab.store.d.ts +1 -1
  56. package/dist/src/renderer/components/dock/terminal.d.ts +2 -0
  57. package/dist/src/renderer/components/hotbar/hotbar-menu.d.ts +1 -1
  58. package/dist/src/renderer/components/menu/menu.d.ts +6 -0
  59. package/dist/src/renderer/components/switch/switcher.d.ts +1 -1
  60. package/dist/src/renderer/lens-app.d.ts +1 -1
  61. package/dist/src/renderer/navigation/history.d.ts +2 -2
  62. package/dist/src/renderer/port-forward/index.d.ts +23 -0
  63. package/dist/src/renderer/port-forward/port-forward-dialog.d.ts +46 -0
  64. package/dist/src/renderer/port-forward/port-forward-item.d.ts +46 -0
  65. package/dist/src/renderer/port-forward/port-forward.store.d.ts +39 -0
  66. package/package.json +4 -4
@@ -25,7 +25,7 @@ import type { ClusterId } from "../../common/cluster-types";
25
25
  export declare class App extends React.Component {
26
26
  static clusterId: ClusterId;
27
27
  constructor(props: {});
28
- static init(): Promise<void>;
28
+ static init(rootElem: HTMLElement): Promise<void>;
29
29
  componentDidMount(): void;
30
30
  startUrl: string;
31
31
  getTabLayoutRoutes(menuItem: ClusterPageMenuRegistration): TabLayoutRoute[];
@@ -39,7 +39,7 @@ export declare class CreateResource extends React.Component<Props> {
39
39
  get currentTemplate(): SelectOption<any>;
40
40
  onChange: (value: string, error?: string) => void;
41
41
  onSelectTemplate: (item: SelectOption) => void;
42
- create: () => Promise<JSX.Element>;
42
+ create: () => Promise<undefined>;
43
43
  renderControls(): JSX.Element;
44
44
  render(): JSX.Element;
45
45
  }
@@ -105,7 +105,7 @@ export declare class DockStore implements DockStorageState {
105
105
  getTabIndex(tabId: TabId): number;
106
106
  protected getNewTabNumber(kind: TabKind): number;
107
107
  createTab(rawTabDesc: DockTabCreate, addNumber?: boolean): DockTab;
108
- closeTab(tabId: TabId): Promise<void>;
108
+ closeTab(tabId: TabId): void;
109
109
  closeTabs(tabs: DockTab[]): void;
110
110
  closeAllTabs(): void;
111
111
  closeOtherTabs(tabId: TabId): void;
@@ -25,6 +25,7 @@ import type { KubeObjectStore } from "../../../common/k8s-api/kube-object.store"
25
25
  export interface EditingResource {
26
26
  resource: string;
27
27
  draft?: string;
28
+ firstDraft?: string;
28
29
  }
29
30
  export declare class EditResourceStore extends DockTabStore<EditingResource> {
30
31
  private watchers;
@@ -36,6 +37,7 @@ export declare class EditResourceStore extends DockTabStore<EditingResource> {
36
37
  getResource(tabId: TabId): KubeObject | undefined;
37
38
  getResourcePath(tabId: TabId): string | undefined;
38
39
  getTabByResource(object: KubeObject): DockTab;
40
+ clearInitialDraft(tabId: TabId): void;
39
41
  reset(): void;
40
42
  }
41
43
  export declare const editResourceStore: EditResourceStore;
@@ -37,7 +37,7 @@ interface WorkloadLogsTabData {
37
37
  }
38
38
  export declare class LogTabStore extends DockTabStore<LogTabData> {
39
39
  constructor();
40
- createPodTab({ selectedPod, selectedContainer }: PodLogsTabData): void;
40
+ createPodTab({ selectedPod, selectedContainer }: PodLogsTabData): string;
41
41
  createWorkloadTab({ workload }: WorkloadLogsTabData): void;
42
42
  renameTab(tabId: string): void;
43
43
  private createDockTab;
@@ -52,5 +52,7 @@ export declare class Terminal {
52
52
  onResize: () => void;
53
53
  onActivate: () => void;
54
54
  onClickLink: (evt: MouseEvent, link: string) => void;
55
+ onContextMenu: () => void;
56
+ onSelectionChange: () => void;
55
57
  keyHandler: (evt: KeyboardEvent) => boolean;
56
58
  }
@@ -21,7 +21,7 @@
21
21
  import "./hotbar-menu.scss";
22
22
  import React from "react";
23
23
  import { IClassName } from "../../utils";
24
- import { CatalogEntity } from "../../api/catalog-entity";
24
+ import type { CatalogEntity } from "../../api/catalog-entity";
25
25
  import { DropResult } from "react-beautiful-dnd";
26
26
  import { HotbarItem } from "../../../common/hotbar-types";
27
27
  interface Props {
@@ -29,6 +29,10 @@ export interface MenuPosition {
29
29
  right?: boolean;
30
30
  bottom?: boolean;
31
31
  }
32
+ export interface MenuStyle {
33
+ top: string;
34
+ left: string;
35
+ }
32
36
  export interface MenuProps {
33
37
  isOpen?: boolean;
34
38
  open(): void;
@@ -47,6 +51,7 @@ export interface MenuProps {
47
51
  }
48
52
  interface State {
49
53
  position?: MenuPosition;
54
+ menuStyle?: MenuStyle;
50
55
  }
51
56
  export declare class Menu extends React.Component<MenuProps, State> {
52
57
  static defaultProps: object;
@@ -60,6 +65,7 @@ export declare class Menu extends React.Component<MenuProps, State> {
60
65
  get isOpen(): boolean;
61
66
  componentDidMount(): void;
62
67
  componentWillUnmount(): void;
68
+ componentDidUpdate(prevProps: MenuProps): void;
63
69
  protected get focusableItems(): MenuItem[];
64
70
  protected get focusedItem(): MenuItem;
65
71
  protected focusNextItem(reverse?: boolean): void;
@@ -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" | "className" | "key" | "style" | "dir" | "form" | "slot" | "title" | "color" | "value" | "type" | "resource" | "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" | "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">>;
30
30
  export {};
@@ -21,7 +21,7 @@
21
21
  import "../common/system-ca";
22
22
  import React from "react";
23
23
  export declare class LensApp extends React.Component {
24
- static init(): Promise<void>;
24
+ static init(rootElem: HTMLElement): Promise<void>;
25
25
  componentDidMount(): void;
26
26
  render(): JSX.Element;
27
27
  }
@@ -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.2.3",
5
+ "version": "5.3.0-git.07c8177a97.0",
6
6
  "copyright": "© 2021 OpenLens Authors",
7
7
  "license": "MIT",
8
8
  "main": "dist/src/extensions/extension-api.js",
@@ -16,9 +16,9 @@
16
16
  "name": "OpenLens Authors"
17
17
  },
18
18
  "dependencies": {
19
- "@types/node": "*",
20
- "@types/react-select": "*",
21
- "@material-ui/core": "*",
19
+ "@types/node": "14.17.14",
20
+ "@types/react-select": "3.1.2",
21
+ "@material-ui/core": "4.12.3",
22
22
  "conf": "^7.0.1",
23
23
  "typed-emitter": "^1.3.1"
24
24
  }