@k8slens/extensions 5.3.1-git.5591f8dca5.0 → 5.3.1-git.56c15e6b0f.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/catalog-entities/kubernetes-cluster.d.ts +1 -2
- package/dist/src/common/vars.d.ts +1 -0
- package/dist/src/extensions/extension-api.js +39 -85
- package/dist/src/extensions/registries/base-registry.d.ts +1 -1
- package/dist/src/main/routes/port-forward-route.d.ts +0 -1
- package/dist/src/renderer/api/__tests__/catalog-entity-registry.test.d.ts +1 -1
- package/dist/src/renderer/api/catalog-entity-registry.d.ts +4 -0
- package/dist/src/renderer/api/catalog-entity.d.ts +1 -5
- package/dist/src/renderer/components/+network-port-forwards/port-forward-menu.d.ts +2 -0
- package/dist/src/renderer/components/+network-services/service-port-component.d.ts +1 -0
- package/dist/src/renderer/components/+workloads-pods/pod-container-port.d.ts +1 -0
- package/dist/src/renderer/components/kube-object-menu/dependencies/hide-details.injectable.d.ts +1 -1
- package/dist/src/renderer/components/menu/menu-actions.d.ts +1 -1
- package/dist/src/renderer/components/monaco-editor/monaco-editor.d.ts +1 -1
- package/dist/src/renderer/port-forward/port-forward-dialog.d.ts +1 -1
- package/dist/src/renderer/port-forward/port-forward-item.d.ts +4 -4
- package/dist/src/renderer/port-forward/port-forward-notify.d.ts +1 -0
- package/dist/src/renderer/port-forward/port-forward.store.d.ts +56 -6
- package/dist/src/renderer/theme.store.d.ts +0 -1
- package/package.json +1 -1
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
20
|
*/
|
|
21
21
|
import { Singleton } from "../../common/utils";
|
|
22
|
-
import { LensExtension } from "../lens-extension";
|
|
22
|
+
import type { LensExtension } from "../lens-extension";
|
|
23
23
|
export declare class BaseRegistry<T, I = T> extends Singleton {
|
|
24
24
|
private items;
|
|
25
25
|
constructor();
|
|
@@ -22,6 +22,5 @@ import type { LensApiRequest } from "../router";
|
|
|
22
22
|
export declare class PortForwardRoute {
|
|
23
23
|
static routePortForward(request: LensApiRequest): Promise<void>;
|
|
24
24
|
static routeCurrentPortForward(request: LensApiRequest): Promise<void>;
|
|
25
|
-
static routeAllPortForwards(request: LensApiRequest): Promise<void>;
|
|
26
25
|
static routeCurrentPortForwardStop(request: LensApiRequest): Promise<void>;
|
|
27
26
|
}
|
|
@@ -25,6 +25,10 @@ import { Disposer } from "../utils";
|
|
|
25
25
|
import { CatalogRunEvent } from "../../common/catalog/catalog-run-event";
|
|
26
26
|
export declare type EntityFilter = (entity: CatalogEntity) => any;
|
|
27
27
|
export declare type CatalogEntityOnBeforeRun = (event: CatalogRunEvent) => void | Promise<void>;
|
|
28
|
+
export declare const catalogEntityRunContext: {
|
|
29
|
+
navigate: (url: string) => void;
|
|
30
|
+
setCommandPaletteContext: (entity?: CatalogEntity) => void;
|
|
31
|
+
};
|
|
28
32
|
export declare class CatalogEntityRegistry {
|
|
29
33
|
private categoryRegistry;
|
|
30
34
|
protected activeEntityId: string | undefined;
|
|
@@ -18,10 +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
|
-
|
|
21
|
+
export { catalogEntityRunContext } from "./catalog-entity-registry";
|
|
22
22
|
export { CatalogCategory, CatalogEntity } from "../../common/catalog";
|
|
23
23
|
export type { CatalogEntityData, CatalogEntityKindData, CatalogEntityActionContext, CatalogEntityAddMenuContext, CatalogEntityAddMenu, CatalogEntityContextMenu, CatalogEntityContextMenuContext, } from "../../common/catalog";
|
|
24
|
-
export declare const catalogEntityRunContext: {
|
|
25
|
-
navigate: (url: string) => void;
|
|
26
|
-
setCommandPaletteContext: (entity?: CatalogEntity) => void;
|
|
27
|
-
};
|
|
@@ -27,6 +27,8 @@ interface Props extends MenuActionsProps {
|
|
|
27
27
|
}
|
|
28
28
|
export declare class PortForwardMenu extends React.Component<Props> {
|
|
29
29
|
remove(): void;
|
|
30
|
+
private startPortForwarding;
|
|
31
|
+
renderStartStopMenuItem(): JSX.Element;
|
|
30
32
|
renderContent(): JSX.Element;
|
|
31
33
|
render(): JSX.Element;
|
|
32
34
|
}
|
|
@@ -29,6 +29,7 @@ export declare class ServicePortComponent extends React.Component<Props> {
|
|
|
29
29
|
waiting: boolean;
|
|
30
30
|
forwardPort: number;
|
|
31
31
|
isPortForwarded: boolean;
|
|
32
|
+
isActive: boolean;
|
|
32
33
|
constructor(props: Props);
|
|
33
34
|
componentDidMount(): void;
|
|
34
35
|
checkExistingPortForwarding(): Promise<void>;
|
|
@@ -33,6 +33,7 @@ export declare class PodContainerPort extends React.Component<Props> {
|
|
|
33
33
|
waiting: boolean;
|
|
34
34
|
forwardPort: number;
|
|
35
35
|
isPortForwarded: boolean;
|
|
36
|
+
isActive: boolean;
|
|
36
37
|
constructor(props: Props);
|
|
37
38
|
componentDidMount(): void;
|
|
38
39
|
checkExistingPortForwarding(): Promise<void>;
|
package/dist/src/renderer/components/kube-object-menu/dependencies/hide-details.injectable.d.ts
CHANGED
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
21
21
|
*/
|
|
22
22
|
import { hideDetails } from "../../kube-detail-params";
|
|
23
|
-
|
|
23
|
+
declare const hideDetailsInjectable: import("@ogre-tools/injectable").Injectable<import("@ogre-tools/injectable").InjectionToken<typeof hideDetails, unknown>, typeof hideDetails, unknown>;
|
|
24
24
|
export default hideDetailsInjectable;
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
import "./menu-actions.scss";
|
|
22
22
|
import React from "react";
|
|
23
23
|
import { IconProps } from "../icon";
|
|
24
|
-
import { MenuProps } from "
|
|
24
|
+
import { MenuProps } from "./menu";
|
|
25
25
|
export interface MenuActionsProps extends Partial<MenuProps> {
|
|
26
26
|
className?: string;
|
|
27
27
|
toolbar?: boolean;
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
/// <reference types="lodash" />
|
|
22
22
|
import React from "react";
|
|
23
23
|
import { editor, Uri } from "monaco-editor";
|
|
24
|
-
import { MonacoTheme } from "./
|
|
24
|
+
import type { MonacoTheme } from "./monaco-themes";
|
|
25
25
|
export declare type MonacoEditorId = string;
|
|
26
26
|
export interface MonacoEditorProps {
|
|
27
27
|
id?: MonacoEditorId;
|
|
@@ -26,6 +26,7 @@ interface Props extends Partial<DialogProps> {
|
|
|
26
26
|
}
|
|
27
27
|
interface PortForwardDialogOpenOptions {
|
|
28
28
|
openInBrowser: boolean;
|
|
29
|
+
onClose: () => void;
|
|
29
30
|
}
|
|
30
31
|
export declare class PortForwardDialog extends Component<Props> {
|
|
31
32
|
currentPort: number;
|
|
@@ -36,7 +37,6 @@ export declare class PortForwardDialog extends Component<Props> {
|
|
|
36
37
|
get portForward(): ForwardedPort;
|
|
37
38
|
close: () => void;
|
|
38
39
|
onOpen: () => Promise<void>;
|
|
39
|
-
onClose: () => void;
|
|
40
40
|
changePort: (value: string) => void;
|
|
41
41
|
startPortForward: () => Promise<void>;
|
|
42
42
|
renderContents(): JSX.Element;
|
|
@@ -19,32 +19,32 @@
|
|
|
19
19
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
20
|
*/
|
|
21
21
|
import type { ItemObject } from "../../common/item.store";
|
|
22
|
+
export declare type ForwardedPortStatus = "Active" | "Disabled";
|
|
22
23
|
export interface ForwardedPort {
|
|
23
|
-
clusterId?: string;
|
|
24
24
|
kind: string;
|
|
25
25
|
namespace: string;
|
|
26
26
|
name: string;
|
|
27
27
|
port: number;
|
|
28
28
|
forwardPort: number;
|
|
29
29
|
protocol?: string;
|
|
30
|
+
status?: ForwardedPortStatus;
|
|
30
31
|
}
|
|
31
32
|
export declare class PortForwardItem implements ItemObject {
|
|
32
|
-
clusterId: string;
|
|
33
33
|
kind: string;
|
|
34
34
|
namespace: string;
|
|
35
35
|
name: string;
|
|
36
36
|
port: number;
|
|
37
37
|
forwardPort: number;
|
|
38
38
|
protocol: string;
|
|
39
|
+
status: ForwardedPortStatus;
|
|
39
40
|
constructor(pf: ForwardedPort);
|
|
40
41
|
getName(): string;
|
|
41
42
|
getNs(): string;
|
|
42
|
-
get id(): number;
|
|
43
43
|
getId(): string;
|
|
44
44
|
getKind(): string;
|
|
45
45
|
getPort(): number;
|
|
46
46
|
getForwardPort(): number;
|
|
47
47
|
getProtocol(): string;
|
|
48
|
-
getStatus():
|
|
48
|
+
getStatus(): ForwardedPortStatus;
|
|
49
49
|
getSearchFields(): (string | number)[];
|
|
50
50
|
}
|
|
@@ -27,13 +27,63 @@ export declare class PortForwardStore extends ItemStore<PortForwardItem> {
|
|
|
27
27
|
private init;
|
|
28
28
|
watch(): import("../utils").ExtendableDisposer;
|
|
29
29
|
loadAll(): Promise<any>;
|
|
30
|
-
reset(): void;
|
|
31
30
|
removeSelectedItems(): Promise<void[]>;
|
|
32
31
|
getById(id: string): PortForwardItem;
|
|
33
32
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
/**
|
|
34
|
+
* start an existing port-forward
|
|
35
|
+
* @param portForward the port-forward to start. If the forwardPort field is 0 then an arbitrary port will be
|
|
36
|
+
* used
|
|
37
|
+
*
|
|
38
|
+
* @returns the port-forward with updated status ("Active" if successfully started, "Disabled" otherwise) and
|
|
39
|
+
* forwardPort
|
|
40
|
+
*
|
|
41
|
+
* @throws if the port-forward does not already exist in the store
|
|
42
|
+
*/
|
|
43
|
+
export declare const startPortForward: (portForward: ForwardedPort) => Promise<ForwardedPort>;
|
|
44
|
+
/**
|
|
45
|
+
* add a port-forward to the store and optionally start it
|
|
46
|
+
* @param portForward the port-forward to add. If the port-forward already exists in the store it will be
|
|
47
|
+
* returned with its current state. If the forwardPort field is 0 then an arbitrary port will be
|
|
48
|
+
* used. If the status field is "Active" or not present then an attempt is made to start the port-forward.
|
|
49
|
+
*
|
|
50
|
+
* @returns the port-forward with updated status ("Active" if successfully started, "Disabled" otherwise) and
|
|
51
|
+
* forwardPort
|
|
52
|
+
*/
|
|
53
|
+
export declare const addPortForward: (portForward: ForwardedPort) => Promise<ForwardedPort>;
|
|
54
|
+
/**
|
|
55
|
+
* get a port-forward from the store, with up-to-date status
|
|
56
|
+
* @param portForward the port-forward to get.
|
|
57
|
+
*
|
|
58
|
+
* @returns the port-forward with updated status ("Active" if running, "Disabled" if not) and
|
|
59
|
+
* forwardPort used.
|
|
60
|
+
*
|
|
61
|
+
* @throws if the port-forward does not exist in the store
|
|
62
|
+
*/
|
|
63
|
+
export declare function getPortForward(portForward: ForwardedPort): Promise<ForwardedPort>;
|
|
64
|
+
/**
|
|
65
|
+
* modifies a port-forward in the store, including the forwardPort and protocol
|
|
66
|
+
* @param portForward the port-forward to modify.
|
|
67
|
+
*
|
|
68
|
+
* @returns the port-forward after being modified.
|
|
69
|
+
*/
|
|
70
|
+
export declare const modifyPortForward: (portForward: ForwardedPort, desiredPort: number) => Promise<ForwardedPort>;
|
|
71
|
+
/**
|
|
72
|
+
* stop an existing port-forward. Its status is set to "Disabled" after successfully stopped.
|
|
73
|
+
* @param portForward the port-forward to stop.
|
|
74
|
+
*
|
|
75
|
+
* @throws if the port-forward could not be stopped. Its status is unchanged
|
|
76
|
+
*/
|
|
77
|
+
export declare const stopPortForward: (portForward: ForwardedPort) => Promise<void>;
|
|
78
|
+
/**
|
|
79
|
+
* remove and stop an existing port-forward.
|
|
80
|
+
* @param portForward the port-forward to remove.
|
|
81
|
+
*/
|
|
82
|
+
export declare const removePortForward: (portForward: ForwardedPort) => Promise<void>;
|
|
83
|
+
/**
|
|
84
|
+
* gets the list of port-forwards in the store
|
|
85
|
+
*
|
|
86
|
+
* @returns the port-forwards
|
|
87
|
+
*/
|
|
88
|
+
export declare function getPortForwards(): ForwardedPort[];
|
|
39
89
|
export declare const portForwardStore: PortForwardStore;
|
|
@@ -31,7 +31,6 @@ export interface Theme {
|
|
|
31
31
|
monacoTheme: MonacoEditorProps["theme"];
|
|
32
32
|
}
|
|
33
33
|
export declare class ThemeStore extends Singleton {
|
|
34
|
-
static readonly defaultTheme = "lens-dark";
|
|
35
34
|
protected styles: HTMLStyleElement;
|
|
36
35
|
private themes;
|
|
37
36
|
get activeThemeId(): string;
|
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.
|
|
5
|
+
"version": "5.3.1-git.56c15e6b0f.0",
|
|
6
6
|
"copyright": "© 2021 OpenLens Authors",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "dist/src/extensions/extension-api.js",
|