@k8slens/extensions 5.2.1-git.53ce818589.0 → 5.2.1-git.548a517e64.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/dist/src/common/routes/catalog.d.ts +2 -0
- package/dist/src/common/user-store/preferences-helpers.d.ts +1 -0
- package/dist/src/common/user-store/user-store.d.ts +1 -0
- package/dist/src/extensions/extension-api.js +2254 -436
- package/dist/src/extensions/registries/command-registry.d.ts +2 -2
- package/dist/src/main/{routes/utils/index.d.ts → __test__/lens-proxy.test.d.ts} +1 -1
- package/dist/src/main/context-handler.d.ts +1 -1
- package/dist/src/main/lens-proxy.d.ts +1 -0
- package/dist/src/main/{routes/utils → utils}/parse-query.d.ts +0 -0
- package/dist/src/renderer/api/catalog-entity-registry.d.ts +3 -1
- package/dist/src/renderer/bootstrap.d.ts +1 -1
- package/dist/src/renderer/components/+add-cluster/add-cluster.d.ts +1 -1
- package/dist/src/renderer/components/+catalog/catalog.d.ts +1 -1
- package/dist/src/renderer/components/+entity-settings/entity-settings.d.ts +0 -1
- package/dist/src/renderer/components/activate-entity-command/activate-entity-command.d.ts +30 -0
- package/dist/src/renderer/components/activate-entity-command/index.d.ts +21 -0
- package/dist/src/renderer/components/app.d.ts +1 -1
- package/dist/src/renderer/components/dock/terminal.d.ts +2 -0
- package/dist/src/renderer/components/input/input.d.ts +1 -1
- package/dist/src/renderer/components/menu/menu.d.ts +6 -0
- package/dist/src/renderer/components/switch/switcher.d.ts +1 -1
- package/dist/src/renderer/lens-app.d.ts +1 -1
- package/package.json +4 -4
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
import { BaseRegistry } from "./base-registry";
|
|
22
22
|
import type { LensExtension } from "../lens-extension";
|
|
23
23
|
import type { CatalogEntity } from "../../common/catalog";
|
|
24
|
-
export
|
|
24
|
+
export interface CommandContext {
|
|
25
25
|
entity?: CatalogEntity;
|
|
26
|
-
}
|
|
26
|
+
}
|
|
27
27
|
export interface CommandRegistration {
|
|
28
28
|
id: string;
|
|
29
29
|
title: string;
|
|
@@ -40,7 +40,7 @@ export declare class ContextHandler {
|
|
|
40
40
|
getPrometheusService(): Promise<PrometheusService | undefined>;
|
|
41
41
|
getPrometheusPath(): Promise<string>;
|
|
42
42
|
resolveAuthProxyUrl(): Promise<string>;
|
|
43
|
-
getApiTarget(
|
|
43
|
+
getApiTarget(isLongRunningRequest?: boolean): Promise<httpProxy.ServerOptions>;
|
|
44
44
|
protected newApiTarget(timeout: number): Promise<httpProxy.ServerOptions>;
|
|
45
45
|
ensureServer(): Promise<void>;
|
|
46
46
|
stopServer(): void;
|
|
@@ -32,6 +32,7 @@ export interface LensProxyFunctions {
|
|
|
32
32
|
shellApiRequest: (args: ProxyApiRequestArgs) => void | Promise<void>;
|
|
33
33
|
kubeApiRequest: (args: ProxyApiRequestArgs) => void | Promise<void>;
|
|
34
34
|
}
|
|
35
|
+
export declare function isLongRunningRequest(reqUrl: string): boolean;
|
|
35
36
|
export declare class LensProxy extends Singleton {
|
|
36
37
|
protected router: Router;
|
|
37
38
|
protected origin: string;
|
|
File without changes
|
|
@@ -25,7 +25,7 @@ import { Disposer } from "../utils";
|
|
|
25
25
|
export declare type EntityFilter = (entity: CatalogEntity) => any;
|
|
26
26
|
export declare class CatalogEntityRegistry {
|
|
27
27
|
private categoryRegistry;
|
|
28
|
-
|
|
28
|
+
protected activeEntityId: string | undefined;
|
|
29
29
|
protected _entities: import("mobx").ObservableMap<string, CatalogEntity<import("../../common/catalog").CatalogEntityMetadata, import("../../common/catalog").CatalogEntityStatus, import("../../common/catalog").CatalogEntitySpec>>;
|
|
30
30
|
protected filters: import("mobx").ObservableSet<EntityFilter>;
|
|
31
31
|
/**
|
|
@@ -33,6 +33,8 @@ export declare class CatalogEntityRegistry {
|
|
|
33
33
|
*/
|
|
34
34
|
protected rawEntities: (CatalogEntityData & CatalogEntityKindData)[];
|
|
35
35
|
constructor(categoryRegistry: CatalogCategoryRegistry);
|
|
36
|
+
get activeEntity(): CatalogEntity | null;
|
|
37
|
+
set activeEntity(raw: CatalogEntity | string | null);
|
|
36
38
|
init(): void;
|
|
37
39
|
updateItems(items: (CatalogEntityData & CatalogEntityKindData)[]): void;
|
|
38
40
|
protected updateItem(item: (CatalogEntityData & CatalogEntityKindData)): void;
|
|
@@ -27,7 +27,7 @@ import * as ReactRouterDom from "react-router-dom";
|
|
|
27
27
|
import * as LensExtensionsCommonApi from "../extensions/common-api";
|
|
28
28
|
import * as LensExtensionsRendererApi from "../extensions/renderer-api";
|
|
29
29
|
declare type AppComponent = React.ComponentType & {
|
|
30
|
-
init?(): Promise<void>;
|
|
30
|
+
init?(rootElem: HTMLElement): Promise<void>;
|
|
31
31
|
};
|
|
32
32
|
export declare function bootstrap(App: AppComponent): Promise<void>;
|
|
33
33
|
/**
|
|
@@ -30,7 +30,7 @@ export declare class AddCluster extends React.Component {
|
|
|
30
30
|
kubeContexts: import("mobx").ObservableMap<string, Option>;
|
|
31
31
|
customConfig: string;
|
|
32
32
|
isWaiting: boolean;
|
|
33
|
-
|
|
33
|
+
errors: string[];
|
|
34
34
|
constructor(props: {});
|
|
35
35
|
componentDidMount(): void;
|
|
36
36
|
get allErrors(): string[];
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import React from "react";
|
|
22
22
|
import { CatalogEntityItem } from "./catalog-entity.store";
|
|
23
|
-
import
|
|
23
|
+
import { CatalogEntityContextMenu } from "../../api/catalog-entity";
|
|
24
24
|
import { CatalogEntity } from "../../../common/catalog";
|
|
25
25
|
import type { RouteComponentProps } from "react-router";
|
|
26
26
|
import { CatalogViewRouteParam } from "../../../common/routes";
|
|
@@ -18,7 +18,6 @@
|
|
|
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 "./entity-settings.scss";
|
|
22
21
|
import React from "react";
|
|
23
22
|
import type { RouteComponentProps } from "react-router";
|
|
24
23
|
import type { CatalogEntity } from "../../api/catalog-entity";
|
|
@@ -0,0 +1,30 @@
|
|
|
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 React from "react";
|
|
22
|
+
import { CatalogEntity } from "../../api/catalog-entity";
|
|
23
|
+
export declare class ActivateEntityCommand extends React.Component {
|
|
24
|
+
get options(): {
|
|
25
|
+
label: string;
|
|
26
|
+
value: CatalogEntity<import("../../../common/catalog").CatalogEntityMetadata, import("../../../common/catalog").CatalogEntityStatus, import("../../../common/catalog").CatalogEntitySpec>;
|
|
27
|
+
}[];
|
|
28
|
+
onSelect(entity: CatalogEntity): void;
|
|
29
|
+
render(): JSX.Element;
|
|
30
|
+
}
|
|
@@ -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 * from "./activate-entity-command";
|
|
@@ -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[];
|
|
@@ -80,7 +80,7 @@ interface State {
|
|
|
80
80
|
}
|
|
81
81
|
export declare class Input extends React.Component<InputProps, State> {
|
|
82
82
|
static defaultProps: object;
|
|
83
|
-
input: InputElement;
|
|
83
|
+
input: InputElement | null;
|
|
84
84
|
validators: InputValidator[];
|
|
85
85
|
state: State;
|
|
86
86
|
setValue(value?: string): void;
|
|
@@ -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" | "
|
|
29
|
+
export declare const Switcher: React.ComponentType<Pick<Props, "name" | "id" | "style" | "dir" | "form" | "slot" | "title" | "color" | "key" | "className" | "value" | "type" | "resource" | "hidden" | "prefix" | "defaultValue" | "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" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "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" | "ref" | "size" | "disabled" | "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
|
}
|
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.1-git.
|
|
5
|
+
"version": "5.2.1-git.548a517e64.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
|
}
|