@k8slens/extensions 5.4.1-git.54b87efd89.0 → 5.4.1-git.a19f094a0d.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/ipc/native-theme.d.ts +6 -0
- package/dist/src/common/k8s-api/api-manager.d.ts +3 -3
- package/dist/src/common/utils/lazy-initialized.d.ts +17 -0
- package/dist/src/common/vars.d.ts +11 -0
- package/dist/src/extensions/extension-api.js +30 -131
- package/dist/src/extensions/lens-renderer-extension.d.ts +2 -1
- package/dist/src/extensions/registries/index.d.ts +0 -1
- package/dist/src/main/helm/exec.d.ts +12 -0
- package/dist/src/main/kube-auth-proxy/kube-auth-proxy.d.ts +2 -3
- package/dist/src/main/kubectl/kubectl.d.ts +0 -1
- package/dist/src/main/lens-proxy.d.ts +4 -4
- package/dist/src/{renderer/initializers/workloads-overview-detail-registry.d.ts → main/native-theme.d.ts} +2 -1
- package/dist/src/main/router.d.ts +3 -0
- package/dist/src/renderer/components/+workloads-overview/detail-components.injectable.d.ts +4 -0
- package/dist/src/renderer/components/+workloads-overview/workloads-overview-detail-registration.d.ts +13 -0
- package/dist/src/renderer/components/select/select.test.d.ts +1 -0
- package/dist/src/renderer/initializers/index.d.ts +0 -1
- package/dist/src/renderer/theme.store.d.ts +5 -0
- package/package.json +1 -1
- package/dist/src/extensions/registries/workloads-overview-detail-registry.d.ts +0 -19
- package/dist/src/main/helm/helm-cli.d.ts +0 -13
- package/dist/src/main/lens-binary.d.ts +0 -42
- package/dist/webpack.dev-server.d.ts +0 -14
- package/dist/webpack.renderer.d.ts +0 -25
|
@@ -18,6 +18,7 @@ import type { AdditionalCategoryColumnRegistration } from "../renderer/component
|
|
|
18
18
|
import type { CustomCategoryViewRegistration } from "../renderer/components/+catalog/custom-views";
|
|
19
19
|
import type { StatusBarRegistration } from "../renderer/components/status-bar/status-bar-registration";
|
|
20
20
|
import type { KubeObjectMenuRegistration } from "../renderer/components/kube-object-menu/dependencies/kube-object-menu-items/kube-object-menu-registration";
|
|
21
|
+
import type { WorkloadsOverviewDetailRegistration } from "../renderer/components/+workloads-overview/workloads-overview-detail-registration";
|
|
21
22
|
import type { KubeObjectStatusRegistration } from "../renderer/components/kube-object-status-icon/kube-object-status-registration";
|
|
22
23
|
export declare class LensRendererExtension extends LensExtension {
|
|
23
24
|
globalPages: registries.PageRegistration[];
|
|
@@ -29,7 +30,7 @@ export declare class LensRendererExtension extends LensExtension {
|
|
|
29
30
|
statusBarItems: StatusBarRegistration[];
|
|
30
31
|
kubeObjectDetailItems: registries.KubeObjectDetailRegistration[];
|
|
31
32
|
kubeObjectMenuItems: KubeObjectMenuRegistration[];
|
|
32
|
-
kubeWorkloadsOverviewItems:
|
|
33
|
+
kubeWorkloadsOverviewItems: WorkloadsOverviewDetailRegistration[];
|
|
33
34
|
commands: CommandRegistration[];
|
|
34
35
|
welcomeMenus: WelcomeMenuRegistration[];
|
|
35
36
|
welcomeBanners: WelcomeBannerRegistration[];
|
|
@@ -7,5 +7,4 @@ export * from "./page-menu-registry";
|
|
|
7
7
|
export * from "./kube-object-detail-registry";
|
|
8
8
|
export * from "./entity-setting-registry";
|
|
9
9
|
export * from "./catalog-entity-detail-registry";
|
|
10
|
-
export * from "./workloads-overview-detail-registry";
|
|
11
10
|
export * from "./protocol-handler";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
3
|
+
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
|
+
*/
|
|
5
|
+
/// <reference types="node" />
|
|
6
|
+
import type { BaseEncodingOptions } from "fs";
|
|
7
|
+
import type { ExecFileOptions } from "child_process";
|
|
8
|
+
/**
|
|
9
|
+
* ExecFile the bundled helm CLI
|
|
10
|
+
* @returns STDOUT
|
|
11
|
+
*/
|
|
12
|
+
export declare function execHelm(args: string[], options?: BaseEncodingOptions & ExecFileOptions): Promise<string>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/// <reference types="node" />
|
|
6
6
|
import { ChildProcess } from "child_process";
|
|
7
7
|
import type { Cluster } from "../../common/cluster/cluster";
|
|
8
|
-
interface
|
|
8
|
+
export interface KubeAuthProxyDependencies {
|
|
9
9
|
proxyBinPath: string;
|
|
10
10
|
}
|
|
11
11
|
export declare class KubeAuthProxy {
|
|
@@ -17,11 +17,10 @@ export declare class KubeAuthProxy {
|
|
|
17
17
|
protected _port: number;
|
|
18
18
|
protected proxyProcess?: ChildProcess;
|
|
19
19
|
protected ready: boolean;
|
|
20
|
-
constructor(dependencies:
|
|
20
|
+
constructor(dependencies: KubeAuthProxyDependencies, cluster: Cluster, env: NodeJS.ProcessEnv);
|
|
21
21
|
get whenReady(): Promise<void> & {
|
|
22
22
|
cancel(): void;
|
|
23
23
|
};
|
|
24
24
|
run(): Promise<void>;
|
|
25
25
|
exit(): void;
|
|
26
26
|
}
|
|
27
|
-
export {};
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
3
3
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
4
|
*/
|
|
5
|
-
export declare function bundledKubectlPath(): string;
|
|
6
5
|
interface Dependencies {
|
|
7
6
|
directoryForKubectlBinaries: string;
|
|
8
7
|
userStore: {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
/// <reference types="node" />
|
|
6
6
|
import type http from "http";
|
|
7
|
-
import httpProxy from "http-proxy";
|
|
7
|
+
import type httpProxy from "http-proxy";
|
|
8
8
|
import type { Router } from "./router";
|
|
9
9
|
import type { ContextHandler } from "./context-handler/context-handler";
|
|
10
10
|
import { Singleton } from "../common/utils";
|
|
@@ -19,14 +19,14 @@ export interface LensProxyFunctions {
|
|
|
19
19
|
export declare function isLongRunningRequest(reqUrl: string): boolean;
|
|
20
20
|
export declare class LensProxy extends Singleton {
|
|
21
21
|
protected router: Router;
|
|
22
|
+
protected proxy: httpProxy;
|
|
22
23
|
protected origin: string;
|
|
23
24
|
protected proxyServer: http.Server;
|
|
24
25
|
protected closed: boolean;
|
|
25
26
|
protected retryCounters: Map<string, number>;
|
|
26
|
-
protected proxy: httpProxy;
|
|
27
27
|
protected getClusterForRequest: GetClusterForRequest;
|
|
28
28
|
port: number;
|
|
29
|
-
constructor(router: Router, { shellApiRequest, kubeApiRequest, getClusterForRequest }: LensProxyFunctions);
|
|
29
|
+
constructor(router: Router, proxy: httpProxy, { shellApiRequest, kubeApiRequest, getClusterForRequest }: LensProxyFunctions);
|
|
30
30
|
/**
|
|
31
31
|
* Starts to listen on an OS provided port. Will reject if the server throws
|
|
32
32
|
* an error.
|
|
@@ -41,7 +41,7 @@ export declare class LensProxy extends Singleton {
|
|
|
41
41
|
*/
|
|
42
42
|
listen(): Promise<void>;
|
|
43
43
|
close(): void;
|
|
44
|
-
protected
|
|
44
|
+
protected configureProxy(proxy: httpProxy): httpProxy;
|
|
45
45
|
protected getProxyTarget(req: http.IncomingMessage, contextHandler: ContextHandler): Promise<httpProxy.ServerOptions | void>;
|
|
46
46
|
protected getRequestId(req: http.IncomingMessage): string;
|
|
47
47
|
protected handleRequest(req: http.IncomingMessage, res: http.ServerResponse): Promise<void>;
|
|
@@ -2,4 +2,5 @@
|
|
|
2
2
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
3
3
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
4
|
*/
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function broadcastNativeThemeOnUpdate(): void;
|
|
6
|
+
export declare function getNativeColorTheme(): "dark" | "light";
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
/// <reference types="node" />
|
|
6
6
|
import type http from "http";
|
|
7
|
+
import type httpProxy from "http-proxy";
|
|
7
8
|
import type { Cluster } from "../common/cluster/cluster";
|
|
8
9
|
export interface RouterRequestOpts {
|
|
9
10
|
req: http.IncomingMessage;
|
|
@@ -30,10 +31,12 @@ export interface LensApiRequest<P = any> {
|
|
|
30
31
|
query: URLSearchParams;
|
|
31
32
|
raw: {
|
|
32
33
|
req: http.IncomingMessage;
|
|
34
|
+
res: http.ServerResponse;
|
|
33
35
|
};
|
|
34
36
|
}
|
|
35
37
|
interface Dependencies {
|
|
36
38
|
routePortForward: (request: LensApiRequest) => Promise<void>;
|
|
39
|
+
httpProxy?: httpProxy;
|
|
37
40
|
}
|
|
38
41
|
export declare class Router {
|
|
39
42
|
private dependencies;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/// <reference types="@ogre-tools/injectable" />
|
|
3
|
+
declare const detailComponentsInjectable: import("@ogre-tools/injectable").NormalInjectable<import("mobx").IComputedValue<import("react").ComponentType<{}>[]>, unknown>;
|
|
4
|
+
export default detailComponentsInjectable;
|
package/dist/src/renderer/components/+workloads-overview/workloads-overview-detail-registration.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
4
|
+
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
5
|
+
*/
|
|
6
|
+
interface WorkloadsOverviewDetailComponents {
|
|
7
|
+
Details: React.ComponentType<{}>;
|
|
8
|
+
}
|
|
9
|
+
export interface WorkloadsOverviewDetailRegistration {
|
|
10
|
+
components: WorkloadsOverviewDetailComponents;
|
|
11
|
+
priority?: number;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom/extend-expect";
|
|
@@ -17,13 +17,18 @@ export interface Theme {
|
|
|
17
17
|
export declare class ThemeStore extends Singleton {
|
|
18
18
|
private terminalColorPrefix;
|
|
19
19
|
private themes;
|
|
20
|
+
osNativeTheme: "dark" | "light" | undefined;
|
|
20
21
|
get activeThemeId(): ThemeId;
|
|
21
22
|
get terminalThemeId(): ThemeId;
|
|
22
23
|
get activeTheme(): Theme;
|
|
23
24
|
get terminalColors(): [string, string][];
|
|
24
25
|
get xtermColors(): Record<string, string>;
|
|
25
26
|
get themeOptions(): SelectOption<string>[];
|
|
27
|
+
get systemTheme(): Theme;
|
|
26
28
|
constructor();
|
|
29
|
+
init(): Promise<void>;
|
|
30
|
+
bindNativeThemeUpdateEvent(): void;
|
|
31
|
+
setNativeTheme(): Promise<void>;
|
|
27
32
|
getThemeById(themeId: ThemeId): Theme;
|
|
28
33
|
protected applyTheme(themeId: ThemeId): void;
|
|
29
34
|
}
|
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.4.1-git.
|
|
5
|
+
"version": "5.4.1-git.a19f094a0d.0",
|
|
6
6
|
"copyright": "© 2021 OpenLens Authors",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "dist/src/extensions/extension-api.js",
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
3
|
-
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
|
-
*/
|
|
5
|
-
import type React from "react";
|
|
6
|
-
import { BaseRegistry } from "./base-registry";
|
|
7
|
-
export interface WorkloadsOverviewDetailComponents {
|
|
8
|
-
Details: React.ComponentType<{}>;
|
|
9
|
-
}
|
|
10
|
-
export interface WorkloadsOverviewDetailRegistration {
|
|
11
|
-
components: WorkloadsOverviewDetailComponents;
|
|
12
|
-
priority?: number;
|
|
13
|
-
}
|
|
14
|
-
declare type RegisteredWorkloadsOverviewDetail = Required<WorkloadsOverviewDetailRegistration>;
|
|
15
|
-
export declare class WorkloadsOverviewDetailRegistry extends BaseRegistry<WorkloadsOverviewDetailRegistration, RegisteredWorkloadsOverviewDetail> {
|
|
16
|
-
getItems(): Required<WorkloadsOverviewDetailRegistration>[];
|
|
17
|
-
protected getRegisteredItem(item: WorkloadsOverviewDetailRegistration): RegisteredWorkloadsOverviewDetail;
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
3
|
-
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
|
-
*/
|
|
5
|
-
import { LensBinary } from "../lens-binary";
|
|
6
|
-
export declare class HelmCli extends LensBinary {
|
|
7
|
-
constructor(baseDir: string, version: string);
|
|
8
|
-
protected getTarName(): string | null;
|
|
9
|
-
protected getUrl(): string;
|
|
10
|
-
protected getBinaryPath(): string;
|
|
11
|
-
protected getOriginalBinaryPath(): string;
|
|
12
|
-
}
|
|
13
|
-
export declare const helmCli: HelmCli;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
3
|
-
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
|
-
*/
|
|
5
|
-
import request from "request";
|
|
6
|
-
import type winston from "winston";
|
|
7
|
-
export interface LensBinaryOpts {
|
|
8
|
-
version: string;
|
|
9
|
-
baseDir: string;
|
|
10
|
-
originalBinaryName: string;
|
|
11
|
-
newBinaryName?: string;
|
|
12
|
-
requestOpts?: request.Options;
|
|
13
|
-
}
|
|
14
|
-
export declare class LensBinary {
|
|
15
|
-
binaryVersion: string;
|
|
16
|
-
protected directory: string;
|
|
17
|
-
protected url: string;
|
|
18
|
-
protected path: string;
|
|
19
|
-
protected tarPath: string;
|
|
20
|
-
protected dirname: string;
|
|
21
|
-
protected binaryName: string;
|
|
22
|
-
protected platformName: string;
|
|
23
|
-
protected arch: string;
|
|
24
|
-
protected originalBinaryName: string;
|
|
25
|
-
protected requestOpts: request.Options;
|
|
26
|
-
protected logger: Console | winston.Logger;
|
|
27
|
-
constructor(opts: LensBinaryOpts);
|
|
28
|
-
setLogger(logger: Console | winston.Logger): void;
|
|
29
|
-
protected binaryDir(): void;
|
|
30
|
-
binaryPath(): Promise<string>;
|
|
31
|
-
protected getTarName(): string | null;
|
|
32
|
-
protected getUrl(): string;
|
|
33
|
-
protected getBinaryPath(): string;
|
|
34
|
-
protected getOriginalBinaryPath(): string;
|
|
35
|
-
getBinaryDir(): string;
|
|
36
|
-
binDir(): Promise<string>;
|
|
37
|
-
protected checkBinary(): Promise<boolean>;
|
|
38
|
-
ensureBinary(): Promise<void>;
|
|
39
|
-
protected untarBinary(): Promise<void>;
|
|
40
|
-
protected renameBinary(): Promise<void>;
|
|
41
|
-
protected downloadBinary(): Promise<void>;
|
|
42
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
3
|
-
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
|
-
*/
|
|
5
|
-
import WebpackDevServer from "webpack-dev-server";
|
|
6
|
-
export interface DevServer extends WebpackDevServer {
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Creates `webpack-dev-server`
|
|
10
|
-
* API docs:
|
|
11
|
-
* @url https://webpack.js.org/configuration/dev-server/
|
|
12
|
-
* @url https://github.com/chimurai/http-proxy-middleware
|
|
13
|
-
*/
|
|
14
|
-
export declare function createDevServer(lensProxyPort: number): DevServer;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
3
|
-
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
|
-
*/
|
|
5
|
-
import type webpack from "webpack";
|
|
6
|
-
export declare function webpackLensRenderer({ showVars }?: {
|
|
7
|
-
showVars?: boolean;
|
|
8
|
-
}): webpack.Configuration;
|
|
9
|
-
/**
|
|
10
|
-
* Import icons and image files.
|
|
11
|
-
* Read more about asset types: https://webpack.js.org/guides/asset-modules/
|
|
12
|
-
*/
|
|
13
|
-
export declare function iconsAndImagesWebpackRules(): webpack.RuleSetRule[];
|
|
14
|
-
/**
|
|
15
|
-
* Import custom fonts as URL.
|
|
16
|
-
*/
|
|
17
|
-
export declare function fontsLoaderWebpackRules(): webpack.RuleSetRule[];
|
|
18
|
-
/**
|
|
19
|
-
* Import CSS or SASS styles with modules support (*.module.scss)
|
|
20
|
-
* @param {string} styleLoader
|
|
21
|
-
*/
|
|
22
|
-
export declare function cssModulesWebpackRule({ styleLoader, }?: {
|
|
23
|
-
styleLoader?: string;
|
|
24
|
-
}): webpack.RuleSetRule;
|
|
25
|
-
export default webpackLensRenderer;
|