@k8slens/extensions 5.4.1-git.cd1f6e1348.0 → 5.4.1-git.d1e4d8e681.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/fs/write-file.injectable.d.ts +4 -0
- package/dist/src/common/k8s-api/endpoints/events.api.d.ts +6 -0
- package/dist/src/common/k8s-api/kube-object.d.ts +15 -0
- package/dist/src/common/utils/tuple.d.ts +4 -0
- package/dist/src/extensions/extension-api.js +56 -34
- package/dist/src/main/child-process/spawn.injectable.d.ts +5 -0
- package/dist/src/main/context-handler/context-handler.d.ts +4 -1
- package/dist/src/main/kube-auth-proxy/create-kube-auth-proxy-cert-files.d.ts +13 -0
- package/dist/src/main/kube-auth-proxy/create-kube-auth-proxy-cert-files.injectable.d.ts +3 -0
- package/dist/src/main/kube-auth-proxy/create-kube-auth-proxy.injectable.d.ts +3 -1
- package/dist/src/main/kube-auth-proxy/kube-auth-proxy-ca.injectable.d.ts +4 -0
- package/dist/src/main/kube-auth-proxy/kube-auth-proxy.d.ts +3 -1
- package/dist/src/main/lens-proxy.d.ts +2 -2
- package/dist/src/main/proxy-functions/index.d.ts +1 -1
- package/dist/src/main/proxy-functions/{kube-api-request.d.ts → kube-api-upgrade-request.d.ts} +1 -1
- package/dist/src/renderer/components/+cluster/cluster-issues.d.ts +2 -3
- package/dist/src/renderer/components/+custom-resources/crd-list.d.ts +1 -2
- package/dist/src/renderer/components/+custom-resources/crd-resources.d.ts +1 -2
- package/dist/src/renderer/components/+events/events.d.ts +0 -1
- package/dist/src/renderer/components/dock/__test__/dock-store.test.d.ts +5 -0
- package/dist/src/renderer/components/dock/dock/store.d.ts +1 -0
- package/dist/src/renderer/components/dock/dock-tab.d.ts +0 -1
- package/dist/src/renderer/components/duration/reactive-duration.d.ts +13 -0
- package/dist/src/renderer/components/kube-object/age.d.ts +14 -0
- package/dist/src/renderer/hooks/index.d.ts +1 -0
- package/dist/src/renderer/hooks/useResizeObserver.d.ts +5 -0
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ import type { Cluster } from "../../common/cluster/cluster";
|
|
|
9
9
|
import type httpProxy from "http-proxy";
|
|
10
10
|
import { UrlWithStringQuery } from "url";
|
|
11
11
|
import type { KubeAuthProxy } from "../kube-auth-proxy/kube-auth-proxy";
|
|
12
|
+
import type { CreateKubeAuthProxy } from "../kube-auth-proxy/create-kube-auth-proxy.injectable";
|
|
12
13
|
export interface PrometheusDetails {
|
|
13
14
|
prometheusPath: string;
|
|
14
15
|
provider: PrometheusProvider;
|
|
@@ -20,7 +21,8 @@ interface PrometheusServicePreferences {
|
|
|
20
21
|
prefix: string;
|
|
21
22
|
}
|
|
22
23
|
interface Dependencies {
|
|
23
|
-
createKubeAuthProxy:
|
|
24
|
+
createKubeAuthProxy: CreateKubeAuthProxy;
|
|
25
|
+
authProxyCa: Promise<Buffer>;
|
|
24
26
|
}
|
|
25
27
|
export declare class ContextHandler {
|
|
26
28
|
private dependencies;
|
|
@@ -38,6 +40,7 @@ export declare class ContextHandler {
|
|
|
38
40
|
protected listPotentialProviders(): PrometheusProvider[];
|
|
39
41
|
protected getPrometheusService(): Promise<PrometheusService>;
|
|
40
42
|
resolveAuthProxyUrl(): Promise<string>;
|
|
43
|
+
resolveAuthProxyCa(): Promise<Buffer>;
|
|
41
44
|
getApiTarget(isLongRunningRequest?: boolean): Promise<httpProxy.ServerOptions>;
|
|
42
45
|
protected newApiTarget(timeout: number): Promise<httpProxy.ServerOptions>;
|
|
43
46
|
ensureServer(): Promise<void>;
|
|
@@ -0,0 +1,13 @@
|
|
|
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 * as selfsigned from "selfsigned";
|
|
7
|
+
declare type SelfSignedGenerate = typeof selfsigned.generate;
|
|
8
|
+
interface CreateKubeAuthProxyCertificateFilesDependencies {
|
|
9
|
+
generate: SelfSignedGenerate;
|
|
10
|
+
writeFile: (path: string, content: string | Buffer) => Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
export declare function createKubeAuthProxyCertFiles(dir: string, dependencies: CreateKubeAuthProxyCertificateFilesDependencies): Promise<string>;
|
|
13
|
+
export {};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
/// <reference types="@ogre-tools/injectable" />
|
|
2
3
|
import { KubeAuthProxy } from "./kube-auth-proxy";
|
|
3
4
|
import type { Cluster } from "../../common/cluster/cluster";
|
|
4
|
-
declare
|
|
5
|
+
export declare type CreateKubeAuthProxy = (cluster: Cluster, environmentVariables: NodeJS.ProcessEnv) => KubeAuthProxy;
|
|
6
|
+
declare const createKubeAuthProxyInjectable: import("@ogre-tools/injectable").Injectable<CreateKubeAuthProxy, unknown, void>;
|
|
5
7
|
export default createKubeAuthProxyInjectable;
|
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
4
|
*/
|
|
5
5
|
/// <reference types="node" />
|
|
6
|
-
import { ChildProcess } from "child_process";
|
|
6
|
+
import type { ChildProcess, spawn } from "child_process";
|
|
7
7
|
import type { Cluster } from "../../common/cluster/cluster";
|
|
8
8
|
export interface KubeAuthProxyDependencies {
|
|
9
9
|
proxyBinPath: string;
|
|
10
|
+
proxyCertPath: Promise<string>;
|
|
11
|
+
spawn: typeof spawn;
|
|
10
12
|
}
|
|
11
13
|
export declare class KubeAuthProxy {
|
|
12
14
|
private dependencies;
|
|
@@ -14,7 +14,7 @@ declare type GetClusterForRequest = (req: http.IncomingMessage) => Cluster | nul
|
|
|
14
14
|
export interface LensProxyFunctions {
|
|
15
15
|
getClusterForRequest: GetClusterForRequest;
|
|
16
16
|
shellApiRequest: (args: ProxyApiRequestArgs) => void | Promise<void>;
|
|
17
|
-
|
|
17
|
+
kubeApiUpgradeRequest: (args: ProxyApiRequestArgs) => void | Promise<void>;
|
|
18
18
|
}
|
|
19
19
|
export declare function isLongRunningRequest(reqUrl: string): boolean;
|
|
20
20
|
export declare class LensProxy extends Singleton {
|
|
@@ -26,7 +26,7 @@ export declare class LensProxy extends Singleton {
|
|
|
26
26
|
protected retryCounters: Map<string, number>;
|
|
27
27
|
protected getClusterForRequest: GetClusterForRequest;
|
|
28
28
|
port: number;
|
|
29
|
-
constructor(router: Router, proxy: httpProxy, { shellApiRequest,
|
|
29
|
+
constructor(router: Router, proxy: httpProxy, { shellApiRequest, kubeApiUpgradeRequest, getClusterForRequest }: LensProxyFunctions);
|
|
30
30
|
/**
|
|
31
31
|
* Starts to listen on an OS provided port. Will reject if the server throws
|
|
32
32
|
* an error.
|
package/dist/src/main/proxy-functions/{kube-api-request.d.ts → kube-api-upgrade-request.d.ts}
RENAMED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
4
|
*/
|
|
5
5
|
import type { ProxyApiRequestArgs } from "./types";
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function kubeApiUpgradeRequest({ req, socket, head, cluster }: ProxyApiRequestArgs): Promise<void>;
|
|
@@ -11,11 +11,10 @@ interface IWarning extends ItemObject {
|
|
|
11
11
|
kind: string;
|
|
12
12
|
message: string;
|
|
13
13
|
selfLink: string;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
renderAge: () => React.ReactElement;
|
|
15
|
+
ageMs: number;
|
|
16
16
|
}
|
|
17
17
|
export declare class ClusterIssues extends React.Component<ClusterIssuesProps> {
|
|
18
|
-
private sortCallbacks;
|
|
19
18
|
constructor(props: ClusterIssuesProps);
|
|
20
19
|
get warnings(): IWarning[];
|
|
21
20
|
getTableRow(uid: string): JSX.Element;
|
|
@@ -4,12 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import "./crd-list.scss";
|
|
6
6
|
import React from "react";
|
|
7
|
-
import type { CustomResourceDefinition } from "../../../common/k8s-api/endpoints/crd.api";
|
|
8
7
|
export declare const crdGroupsUrlParam: import("../../navigation").PageParam<string[]>;
|
|
9
8
|
export declare class CustomResourceDefinitions extends React.Component {
|
|
10
9
|
constructor(props: {});
|
|
11
10
|
get selectedGroups(): string[];
|
|
12
|
-
get items(): CustomResourceDefinition[];
|
|
11
|
+
get items(): import("../../../common/k8s-api/endpoints").CustomResourceDefinition[];
|
|
13
12
|
toggleSelection(group: string): void;
|
|
14
13
|
render(): JSX.Element;
|
|
15
14
|
}
|
|
@@ -5,13 +5,12 @@
|
|
|
5
5
|
import "./crd-resources.scss";
|
|
6
6
|
import React from "react";
|
|
7
7
|
import type { RouteComponentProps } from "react-router";
|
|
8
|
-
import type { KubeObject } from "../../../common/k8s-api/kube-object";
|
|
9
8
|
import type { CRDRouteParams } from "../../../common/routes";
|
|
10
9
|
export interface CustomResourceDefinitionResourcesProps extends RouteComponentProps<CRDRouteParams> {
|
|
11
10
|
}
|
|
12
11
|
export declare class CustomResourceDefinitionResources extends React.Component<CustomResourceDefinitionResourcesProps> {
|
|
13
12
|
constructor(props: CustomResourceDefinitionResourcesProps);
|
|
14
13
|
get crd(): import("../../../common/k8s-api/endpoints").CustomResourceDefinition;
|
|
15
|
-
get store(): import("../../../common/k8s-api/kube-object.store").KubeObjectStore<KubeObject<import("../../../common/k8s-api/kube-object").KubeObjectMetadata, any, any>>;
|
|
14
|
+
get store(): import("../../../common/k8s-api/kube-object.store").KubeObjectStore<import("../../../common/k8s-api/kube-object").KubeObject<import("../../../common/k8s-api/kube-object").KubeObjectMetadata, any, any>>;
|
|
16
15
|
render(): JSX.Element;
|
|
17
16
|
}
|
|
@@ -17,7 +17,6 @@ export interface EventsProps extends Partial<KubeObjectListLayoutProps<KubeEvent
|
|
|
17
17
|
}
|
|
18
18
|
export declare class Events extends React.Component<EventsProps> {
|
|
19
19
|
static defaultProps: object;
|
|
20
|
-
now: number;
|
|
21
20
|
sorting: TableSortParams;
|
|
22
21
|
private sortingCallbacks;
|
|
23
22
|
constructor(props: EventsProps);
|
|
@@ -100,6 +100,7 @@ export declare class DockStore implements DockStorageState {
|
|
|
100
100
|
set tabs(tabs: DockTab[]);
|
|
101
101
|
get selectedTabId(): TabId | undefined;
|
|
102
102
|
set selectedTabId(tabId: TabId);
|
|
103
|
+
get tabsNumber(): number;
|
|
103
104
|
get selectedTab(): Required<DockTabCreate>;
|
|
104
105
|
private init;
|
|
105
106
|
get maxHeight(): number;
|
|
@@ -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
|
-
import "./dock-tab.scss";
|
|
6
5
|
import React from "react";
|
|
7
6
|
import type { DockTab as DockTabModel } from "./dock/store";
|
|
8
7
|
import { TabProps } from "../tabs";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
3
|
+
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
|
+
*/
|
|
5
|
+
export interface ReactiveDurationProps {
|
|
6
|
+
timestamp: string;
|
|
7
|
+
/**
|
|
8
|
+
* Whether the display string should prefer length over precision
|
|
9
|
+
* @default true
|
|
10
|
+
*/
|
|
11
|
+
compact?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const ReactiveDuration: ({ timestamp, compact }: ReactiveDurationProps) => JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
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 { KubeObject } from "../../../common/k8s-api/kube-object";
|
|
6
|
+
export interface KubeObjectAgeProps {
|
|
7
|
+
object: KubeObject;
|
|
8
|
+
/**
|
|
9
|
+
* Whether the display string should prefer length over precision
|
|
10
|
+
* @default true
|
|
11
|
+
*/
|
|
12
|
+
compact?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const KubeObjectAge: ({ object, compact }: KubeObjectAgeProps) => JSX.Element;
|
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.d1e4d8e681.0",
|
|
6
6
|
"copyright": "© 2021 OpenLens Authors",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "dist/src/extensions/extension-api.js",
|