@k8slens/extensions 5.3.3 → 5.3.4
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/dist/src/common/cluster-types.d.ts +5 -1
- package/dist/src/common/k8s-api/endpoints/crd.api.d.ts +29 -28
- package/dist/src/common/utils/promise-exec.d.ts +1 -2
- package/dist/src/extensions/extension-api.js +48 -24
- package/dist/src/extensions/extension-compatibility.d.ts +3 -1
- package/dist/src/main/cluster-manager.d.ts +1 -1
- package/dist/src/main/helm/helm-release-manager.d.ts +9 -10
- package/dist/src/main/helm/helm-repo-manager.d.ts +2 -2
- package/dist/src/main/helm/helm-service.d.ts +2 -2
- package/dist/src/main/lens-proxy.d.ts +8 -1
- package/dist/src/renderer/components/+network-policies/network-policy-details.d.ts +5 -2
- package/dist/src/renderer/components/kubeconfig-dialog/kubeconfig-dialog.d.ts +0 -1
- package/dist/src/renderer/components/{clipboard/index.d.ts → layout/close-button.d.ts} +6 -1
- package/dist/src/renderer/components/switch/switcher.d.ts +1 -1
- package/dist/src/renderer/utils/index.d.ts +0 -1
- package/package.json +1 -1
- package/dist/src/renderer/components/clipboard/clipboard.d.ts +0 -37
- package/dist/src/renderer/utils/copyToClipboard.d.ts +0 -27
|
@@ -18,6 +18,8 @@
|
|
|
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 { SemVer } from "semver";
|
|
21
22
|
import type { LensExtensionManifest } from "./lens-extension";
|
|
22
|
-
export declare function
|
|
23
|
+
export declare function rawIsCompatibleExtension(version: SemVer): (manifest: LensExtensionManifest) => boolean;
|
|
24
|
+
export declare const isCompatibleExtension: (manifest: LensExtensionManifest) => boolean;
|
|
23
25
|
export declare function isCompatibleBundledExtension(manifest: LensExtensionManifest): boolean;
|
|
@@ -34,7 +34,7 @@ export declare class ClusterManager extends Singleton {
|
|
|
34
34
|
protected updateCatalog(clusters: Cluster[]): void;
|
|
35
35
|
protected updateEntityFromCluster(cluster: Cluster): void;
|
|
36
36
|
protected updateEntityStatus(entity: KubernetesCluster, cluster?: Cluster): void;
|
|
37
|
-
syncClustersFromCatalog(entities: KubernetesCluster[]): void;
|
|
37
|
+
protected syncClustersFromCatalog(entities: KubernetesCluster[]): void;
|
|
38
38
|
protected onNetworkOffline: () => void;
|
|
39
39
|
protected onNetworkOnline: () => void;
|
|
40
40
|
stop(): void;
|
|
@@ -18,27 +18,26 @@
|
|
|
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
|
-
|
|
22
|
-
export declare function
|
|
23
|
-
export declare function installChart(chart: string, values: any, name: string | undefined, namespace: string, version: string, pathToKubeconfig: string): Promise<{
|
|
21
|
+
export declare function listReleases(pathToKubeconfig: string, namespace?: string): Promise<Record<string, any>[]>;
|
|
22
|
+
export declare function installChart(chart: string, values: any, name: string | undefined, namespace: string, version: string, kubeconfigPath: string): Promise<{
|
|
24
23
|
log: string;
|
|
25
24
|
release: {
|
|
26
25
|
name: string;
|
|
27
26
|
namespace: string;
|
|
28
27
|
};
|
|
29
28
|
}>;
|
|
30
|
-
export declare function upgradeRelease(name: string, chart: string, values: any, namespace: string, version: string,
|
|
29
|
+
export declare function upgradeRelease(name: string, chart: string, values: any, namespace: string, version: string, kubeconfigPath: string, kubectlPath: string): Promise<{
|
|
31
30
|
log: string;
|
|
32
31
|
release: Promise<any>;
|
|
33
32
|
}>;
|
|
34
|
-
export declare function getRelease(name: string, namespace: string,
|
|
35
|
-
export declare function deleteRelease(name: string, namespace: string,
|
|
33
|
+
export declare function getRelease(name: string, namespace: string, kubeconfigPath: string, kubectlPath: string): Promise<any>;
|
|
34
|
+
export declare function deleteRelease(name: string, namespace: string, kubeconfigPath: string): Promise<string>;
|
|
36
35
|
interface GetValuesOptions {
|
|
37
36
|
namespace: string;
|
|
38
37
|
all?: boolean;
|
|
39
|
-
|
|
38
|
+
kubeconfigPath: string;
|
|
40
39
|
}
|
|
41
|
-
export declare function getValues(name: string, { namespace, all,
|
|
42
|
-
export declare function getHistory(name: string, namespace: string,
|
|
43
|
-
export declare function rollback(name: string, namespace: string, revision: number,
|
|
40
|
+
export declare function getValues(name: string, { namespace, all, kubeconfigPath }: GetValuesOptions): Promise<string>;
|
|
41
|
+
export declare function getHistory(name: string, namespace: string, kubeconfigPath: string): Promise<any>;
|
|
42
|
+
export declare function rollback(name: string, namespace: string, revision: number, kubeconfigPath: string): Promise<any>;
|
|
44
43
|
export {};
|
|
@@ -47,8 +47,8 @@ export declare class HelmRepoManager extends Singleton {
|
|
|
47
47
|
repo(name: string): Promise<HelmRepo>;
|
|
48
48
|
private readConfig;
|
|
49
49
|
repositories(): Promise<HelmRepo[]>;
|
|
50
|
-
static update(): Promise<
|
|
50
|
+
static update(): Promise<string>;
|
|
51
51
|
static addRepo({ name, url }: HelmRepo): Promise<string>;
|
|
52
|
-
static addCustomRepo(
|
|
52
|
+
static addCustomRepo({ name, url, insecureSkipTlsVerify, username, password, caFile, keyFile, certFile }: HelmRepo): Promise<string>;
|
|
53
53
|
static removeRepo({ name, url }: HelmRepo): Promise<string>;
|
|
54
54
|
}
|
|
@@ -44,7 +44,7 @@ declare class HelmService {
|
|
|
44
44
|
versions: import("../../common/k8s-api/endpoints/helm-charts.api").RawHelmChart[];
|
|
45
45
|
}>;
|
|
46
46
|
getChartValues(repoName: string, chartName: string, version?: string): Promise<string>;
|
|
47
|
-
listReleases(cluster: Cluster, namespace?: string): Promise<any>;
|
|
47
|
+
listReleases(cluster: Cluster, namespace?: string): Promise<Record<string, any>[]>;
|
|
48
48
|
getRelease(cluster: Cluster, releaseName: string, namespace: string): Promise<any>;
|
|
49
49
|
getReleaseValues(releaseName: string, { cluster, namespace, all }: GetReleaseValuesArgs): Promise<string>;
|
|
50
50
|
getReleaseHistory(cluster: Cluster, releaseName: string, namespace: string): Promise<any>;
|
|
@@ -58,7 +58,7 @@ declare class HelmService {
|
|
|
58
58
|
release: Promise<any>;
|
|
59
59
|
}>;
|
|
60
60
|
rollback(cluster: Cluster, releaseName: string, namespace: string, revision: number): Promise<{
|
|
61
|
-
message: Promise<
|
|
61
|
+
message: Promise<any>;
|
|
62
62
|
}>;
|
|
63
63
|
}
|
|
64
64
|
export declare const helmService: HelmService;
|
|
@@ -43,9 +43,16 @@ export declare class LensProxy extends Singleton {
|
|
|
43
43
|
protected getClusterForRequest: GetClusterForRequest;
|
|
44
44
|
port: number;
|
|
45
45
|
constructor(router: Router, { shellApiRequest, kubeApiRequest, getClusterForRequest }: LensProxyFunctions);
|
|
46
|
+
/**
|
|
47
|
+
* Starts to listen on an OS provided port. Will reject if the server throws
|
|
48
|
+
* an error.
|
|
49
|
+
*
|
|
50
|
+
* Resolves with the port number that was picked
|
|
51
|
+
*/
|
|
52
|
+
private attemptToListen;
|
|
46
53
|
/**
|
|
47
54
|
* Starts the lens proxy.
|
|
48
|
-
* @resolves After the server is listening
|
|
55
|
+
* @resolves After the server is listening on a good port
|
|
49
56
|
* @rejects if there is an error before that happens
|
|
50
57
|
*/
|
|
51
58
|
listen(): Promise<void>;
|
|
@@ -19,13 +19,16 @@
|
|
|
19
19
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
20
|
*/
|
|
21
21
|
import React from "react";
|
|
22
|
-
import { IPolicyIpBlock,
|
|
22
|
+
import { IPolicyIpBlock, NetworkPolicy, NetworkPolicyPeer, NetworkPolicyPort } from "../../../common/k8s-api/endpoints/network-policy.api";
|
|
23
23
|
import type { KubeObjectDetailsProps } from "../kube-object-details";
|
|
24
|
+
import type { LabelMatchExpression, LabelSelector } from "../../../common/k8s-api/kube-object";
|
|
24
25
|
interface Props extends KubeObjectDetailsProps<NetworkPolicy> {
|
|
25
26
|
}
|
|
26
27
|
export declare class NetworkPolicyDetails extends React.Component<Props> {
|
|
27
28
|
renderIPolicyIpBlock(ipBlock: IPolicyIpBlock | undefined): JSX.Element;
|
|
28
|
-
|
|
29
|
+
renderMatchLabels(matchLabels: Record<string, string | undefined> | undefined): JSX.Element[];
|
|
30
|
+
renderMatchExpressions(matchExpressions: LabelMatchExpression[] | undefined): JSX.Element[];
|
|
31
|
+
renderIPolicySelector(name: string, selector: LabelSelector | undefined): JSX.Element;
|
|
29
32
|
renderNetworkPolicyPeers(name: string, peers: NetworkPolicyPeer[] | undefined): JSX.Element;
|
|
30
33
|
renderNetworkPolicyPorts(ports: NetworkPolicyPort[] | undefined): JSX.Element;
|
|
31
34
|
render(): JSX.Element;
|
|
@@ -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;
|
|
@@ -18,4 +18,9 @@
|
|
|
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
|
-
|
|
21
|
+
import "./close-button.scss";
|
|
22
|
+
import { HTMLAttributes } from "react";
|
|
23
|
+
interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
24
|
+
}
|
|
25
|
+
export declare function CloseButton(props: Props): JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -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, "
|
|
29
|
+
export declare const Switcher: React.ComponentType<Pick<Props, "key" | "name" | "id" | "value" | "type" | "size" | "resource" | "style" | "dir" | "form" | "slot" | "title" | "color" | "prefix" | "defaultValue" | "hidden" | "className" | "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" | "autoFocus" | "icon" | "checked" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "placeholder" | "readOnly" | "required" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "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" | "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 {};
|
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.
|
|
5
|
+
"version": "5.3.4",
|
|
6
6
|
"copyright": "© 2021 OpenLens Authors",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "dist/src/extensions/extension-api.js",
|
|
@@ -1,37 +0,0 @@
|
|
|
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 "./clipboard.scss";
|
|
22
|
-
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
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
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 copyToClipboard(elem: HTMLElement, { resetSelection }?: {
|
|
22
|
-
resetSelection?: boolean;
|
|
23
|
-
}): {
|
|
24
|
-
copied: boolean;
|
|
25
|
-
copiedText: string;
|
|
26
|
-
clearSelection: () => void;
|
|
27
|
-
};
|