@k8slens/extensions 5.6.0-git.b86d409c92.0 → 5.6.0-git.b95ab425ba.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/app-paths/app-path-injection-token.d.ts +0 -1
- package/dist/src/common/application-update/selected-update-channel/default-update-channel.injectable.d.ts +2 -0
- package/dist/src/common/application-update/selected-update-channel/selected-update-channel.injectable.d.ts +8 -0
- package/dist/src/common/application-update/update-channels.d.ts +11 -0
- package/dist/src/common/cluster/cluster.d.ts +2 -2
- package/dist/src/common/cluster/create-cluster-injection-token.d.ts +2 -2
- package/dist/src/common/cluster-store/allowed-resources-injection-token.d.ts +6 -0
- package/dist/src/common/cluster-store/cluster-store.d.ts +4 -1
- package/dist/src/common/cluster-store/read-cluster-config.injectable.d.ts +4 -0
- package/dist/src/common/cluster-types.d.ts +8 -0
- package/dist/src/common/front-end-routing/{route-injection-token.d.ts → front-end-route-injection-token.d.ts} +1 -1
- package/dist/src/common/front-end-routing/navigate-to-route-injection-token.d.ts +1 -1
- package/dist/src/common/front-end-routing/routes/catalog/catalog-route.injectable.d.ts +1 -1
- package/dist/src/common/front-end-routing/routes/cluster/custom-resources/custom-resources/custom-resources-route.injectable.d.ts +1 -1
- package/dist/src/common/front-end-routing/routes/cluster-view/cluster-view-route.injectable.d.ts +1 -1
- package/dist/src/common/fs/read-file-sync.injectable.d.ts +3 -0
- package/dist/src/common/ipc/index.d.ts +0 -1
- package/dist/src/common/k8s-api/endpoints/cluster.api.d.ts +7 -0
- package/dist/src/common/k8s-api/endpoints/custom-resource-definition.api.d.ts +8 -3
- package/dist/src/common/k8s-api/endpoints/ingress.api.d.ts +1 -1
- package/dist/src/common/k8s-api/endpoints/metrics.api.d.ts +1 -1
- package/dist/src/common/{ipc-channel/channel.d.ts → k8s-api/endpoints/types/external-documentation.d.ts} +3 -3
- package/dist/src/common/k8s-api/endpoints/types/json-schema-props.d.ts +86 -0
- package/dist/src/common/k8s-api/kube-api.d.ts +9 -0
- package/dist/src/common/k8s-api/kube-object.store.d.ts +2 -2
- package/dist/src/common/kube-helpers.d.ts +10 -2
- package/dist/src/common/terminal/channels.d.ts +28 -0
- package/dist/src/common/user-store/preferences-helpers.d.ts +2 -6
- package/dist/src/common/user-store/user-store.d.ts +7 -3
- package/dist/src/common/utils/buildUrl.d.ts +1 -1
- package/dist/src/common/utils/reject-promise.d.ts +2 -2
- package/dist/src/common/utils/resolve-system-proxy/resolve-system-proxy-injection-token.d.ts +6 -0
- package/dist/src/common/utils/type-narrowing.d.ts +5 -0
- package/dist/src/common/vars/base-bundled-binaries-dir.injectable.d.ts +2 -0
- package/dist/src/common/vars/bundled-resources-dir.injectable.d.ts +2 -0
- package/dist/src/common/vars/normalized-platform-architecture.injectable.d.ts +2 -0
- package/dist/src/common/vars/normalized-platform.injectable.d.ts +2 -0
- package/dist/src/common/vars/package-json.injectable.d.ts +353 -0
- package/dist/src/common/vars.d.ts +7 -9
- package/dist/src/extensions/common-api/index.d.ts +2 -1
- package/dist/src/extensions/common-api/proxy.d.ts +10 -0
- package/dist/src/extensions/extension-loader/extension/extension.injectable.d.ts +7 -0
- package/dist/src/extensions/extension-loader/extension-loader.d.ts +2 -2
- package/dist/src/extensions/extension-loader/extension-registrator-injection-token.d.ts +7 -0
- package/dist/src/extensions/extensions-store/extensions-store.d.ts +5 -4
- package/dist/src/extensions/lens-extension-set-dependencies.d.ts +1 -1
- package/dist/src/extensions/lens-renderer-extension.d.ts +2 -0
- package/dist/src/extensions/registries/entity-setting-registry.d.ts +1 -1
- package/dist/src/extensions/renderer-api/components.d.ts +1 -0
- package/dist/src/main/app-paths/app-name/product-name.injectable.d.ts +2 -0
- package/dist/src/main/kube-auth-proxy/kube-auth-proxy.d.ts +1 -0
- package/dist/src/main/kubectl/kubectl.d.ts +18 -14
- package/dist/src/main/start-main-application/lens-window/application-window/application-window.injectable.d.ts +1 -6
- package/dist/src/main/start-main-application/lens-window/application-window/{create-electron-window-for.injectable.d.ts → create-electron-window.injectable.d.ts} +4 -5
- package/dist/src/main/start-main-application/lens-window/application-window/create-lens-window.injectable.d.ts +6 -9
- package/dist/src/main/start-main-application/lens-window/application-window/lens-window-injection-token.d.ts +6 -3
- package/dist/src/main/start-main-application/lens-window/application-window/wait-until-bundled-extensions-are-loaded.injectable.d.ts +2 -0
- package/dist/src/main/start-main-application/lens-window/navigate.injectable.d.ts +1 -1
- package/dist/src/main/start-main-application/lens-window/splash-window/splash-window.injectable.d.ts +1 -6
- package/dist/src/main/{app-paths/register-channel → utils/channel}/ipc-main/ipc-main.injectable.d.ts +0 -1
- package/dist/src/renderer/api/terminal-api.d.ts +2 -22
- package/dist/src/renderer/api/websocket-api.d.ts +4 -4
- package/dist/src/{common/cluster-store → renderer/cluster-frame-context}/hosted-cluster-id.injectable.d.ts +0 -0
- package/dist/src/{common/cluster-store → renderer/cluster-frame-context}/hosted-cluster.injectable.d.ts +1 -1
- package/dist/src/{common/ipc-channel/create-channel/create-channel.d.ts → renderer/components/+preferences/app-preference-tab/app-preference-tab-registration.d.ts} +5 -2
- package/dist/src/renderer/components/animate/animate.d.ts +6 -1
- package/dist/src/renderer/components/animate/request-animation-frame.injectable.d.ts +2 -0
- package/dist/src/renderer/components/dock/dock/create-dock-tab.injectable.d.ts +1 -1
- package/dist/src/renderer/components/dock/terminal/terminal.d.ts +6 -3
- package/dist/src/renderer/components/drawer/drawer-item.d.ts +7 -2
- package/dist/src/renderer/components/drawer/drawer-title.d.ts +5 -1
- package/dist/src/renderer/components/input/input.d.ts +7 -8
- package/dist/src/renderer/components/input/input_validators.d.ts +28 -15
- package/dist/src/renderer/components/layout/sidebar-items.injectable.d.ts +0 -2
- package/dist/src/renderer/components/notifications/index.d.ts +0 -1
- package/dist/src/renderer/components/notifications/notifications-store.injectable.d.ts +3 -0
- package/dist/src/renderer/components/notifications/notifications.d.ts +7 -12
- package/dist/src/renderer/components/notifications/notifications.store.d.ts +0 -1
- package/dist/src/renderer/components/select/select.d.ts +1 -1
- package/dist/src/renderer/components/table/table-cell.d.ts +0 -4
- package/dist/src/renderer/components/wizard/wizard.d.ts +2 -0
- package/dist/src/renderer/routes/route-path-parameters.injectable.d.ts +1 -1
- package/dist/src/renderer/{app-paths/get-value-from-registered-channel/ipc-renderer → utils/channel}/ipc-renderer.injectable.d.ts +0 -1
- package/dist/src/renderer/utils/index.d.ts +0 -1
- package/package.json +2 -2
- package/dist/src/common/app-paths/directory-for-bundled-binaries/directory-for-bundled-binaries.injectable.d.ts +0 -2
- package/dist/src/common/cluster-store/allowed-resources.injectable.d.ts +0 -2
- package/dist/src/common/ipc/update-available.d.ts +0 -19
- package/dist/src/renderer/utils/display-booleans.d.ts +0 -6
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { PathName } from "./app-path-names";
|
|
2
2
|
export declare type AppPaths = Record<PathName, string>;
|
|
3
3
|
export declare const appPathsInjectionToken: import("@ogre-tools/injectable").InjectionToken<AppPaths, void>;
|
|
4
|
-
export declare const appPathsIpcChannel: import("../ipc-channel/channel").Channel<AppPaths>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IComputedValue } from "mobx";
|
|
2
|
+
import type { UpdateChannel, UpdateChannelId } from "../update-channels";
|
|
3
|
+
export interface SelectedUpdateChannel {
|
|
4
|
+
value: IComputedValue<UpdateChannel>;
|
|
5
|
+
setValue: (channelId?: UpdateChannelId) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const selectedUpdateChannelInjectable: import("@ogre-tools/injectable").Injectable<SelectedUpdateChannel, unknown, void>;
|
|
8
|
+
export default selectedUpdateChannelInjectable;
|
|
@@ -0,0 +1,11 @@
|
|
|
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 declare type UpdateChannelId = "alpha" | "beta" | "latest";
|
|
6
|
+
export declare const updateChannels: Record<UpdateChannelId, UpdateChannel>;
|
|
7
|
+
export interface UpdateChannel {
|
|
8
|
+
readonly id: UpdateChannelId;
|
|
9
|
+
readonly label: string;
|
|
10
|
+
readonly moreStableUpdateChannel: UpdateChannel | null;
|
|
11
|
+
}
|
|
@@ -9,7 +9,7 @@ import type { KubeconfigManager } from "../../main/kubeconfig-manager/kubeconfig
|
|
|
9
9
|
import type { KubeResource } from "../rbac";
|
|
10
10
|
import type { VersionDetector } from "../../main/cluster-detectors/version-detector";
|
|
11
11
|
import type { DetectorRegistry } from "../../main/cluster-detectors/detector-registry";
|
|
12
|
-
import type { ClusterState, ClusterRefreshOptions, ClusterMetricsResourceType, ClusterId, ClusterMetadata, ClusterModel, ClusterPreferences, ClusterPrometheusPreferences, UpdateClusterModel } from "../cluster-types";
|
|
12
|
+
import type { ClusterState, ClusterRefreshOptions, ClusterMetricsResourceType, ClusterId, ClusterMetadata, ClusterModel, ClusterPreferences, ClusterPrometheusPreferences, UpdateClusterModel, ClusterConfigData } from "../cluster-types";
|
|
13
13
|
import { ClusterStatus } from "../cluster-types";
|
|
14
14
|
import type { CanI } from "./authorization-review.injectable";
|
|
15
15
|
import type { ListNamespaces } from "./list-namespaces.injectable";
|
|
@@ -187,7 +187,7 @@ export declare class Cluster implements ClusterModel, ClusterState {
|
|
|
187
187
|
* @internal
|
|
188
188
|
*/
|
|
189
189
|
get defaultNamespace(): string | undefined;
|
|
190
|
-
constructor(dependencies: ClusterDependencies, model: ClusterModel);
|
|
190
|
+
constructor(dependencies: ClusterDependencies, model: ClusterModel, configData: ClusterConfigData);
|
|
191
191
|
/**
|
|
192
192
|
* Update cluster data model
|
|
193
193
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ClusterModel } from "../cluster-types";
|
|
1
|
+
import type { ClusterConfigData, ClusterModel } from "../cluster-types";
|
|
2
2
|
import type { Cluster } from "./cluster";
|
|
3
|
-
export declare type CreateCluster = (model: ClusterModel) => Cluster;
|
|
3
|
+
export declare type CreateCluster = (model: ClusterModel, configData: ClusterConfigData) => Cluster;
|
|
4
4
|
export declare const createClusterInjectionToken: import("@ogre-tools/injectable").InjectionToken<CreateCluster, void>;
|
|
@@ -0,0 +1,6 @@
|
|
|
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 { IComputedValue } from "mobx";
|
|
6
|
+
export declare const allowedResourcesInjectionToken: import("@ogre-tools/injectable").InjectionToken<IComputedValue<Set<string>>, void>;
|
|
@@ -5,11 +5,14 @@
|
|
|
5
5
|
import { BaseStore } from "../base-store";
|
|
6
6
|
import { Cluster } from "../cluster/cluster";
|
|
7
7
|
import type { ClusterModel, ClusterId } from "../cluster-types";
|
|
8
|
+
import type { CreateCluster } from "../cluster/create-cluster-injection-token";
|
|
9
|
+
import type { ReadClusterConfigSync } from "./read-cluster-config.injectable";
|
|
8
10
|
export interface ClusterStoreModel {
|
|
9
11
|
clusters?: ClusterModel[];
|
|
10
12
|
}
|
|
11
13
|
interface Dependencies {
|
|
12
|
-
createCluster:
|
|
14
|
+
createCluster: CreateCluster;
|
|
15
|
+
readClusterConfigSync: ReadClusterConfigSync;
|
|
13
16
|
}
|
|
14
17
|
export declare class ClusterStore extends BaseStore<ClusterStoreModel> {
|
|
15
18
|
private dependencies;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ClusterConfigData, ClusterModel } from "../cluster-types";
|
|
2
|
+
export declare type ReadClusterConfigSync = (model: ClusterModel) => ClusterConfigData;
|
|
3
|
+
declare const readClusterConfigSyncInjectable: import("@ogre-tools/injectable").Injectable<ReadClusterConfigSync, unknown, void>;
|
|
4
|
+
export default readClusterConfigSyncInjectable;
|
|
@@ -53,6 +53,14 @@ export interface ClusterModel {
|
|
|
53
53
|
*/
|
|
54
54
|
labels?: Record<string, string>;
|
|
55
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* This data is retreived from the kubeconfig file before calling the cluster constructor.
|
|
58
|
+
*
|
|
59
|
+
* That is done to remove the external dependency on the construction of Cluster instances.
|
|
60
|
+
*/
|
|
61
|
+
export interface ClusterConfigData {
|
|
62
|
+
clusterServerUrl: string;
|
|
63
|
+
}
|
|
56
64
|
/**
|
|
57
65
|
* The complete set of cluster settings or preferences
|
|
58
66
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IComputedValue } from "mobx";
|
|
2
2
|
import type { LensRendererExtension } from "../../extensions/lens-renderer-extension";
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const frontEndRouteInjectionToken: import("@ogre-tools/injectable").InjectionToken<Route<unknown>, void>;
|
|
4
4
|
export interface Route<TParameter = void> {
|
|
5
5
|
path: string;
|
|
6
6
|
clusterFrame: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Route } from "./route-injection-token";
|
|
1
|
+
import type { Route } from "./front-end-route-injection-token";
|
|
2
2
|
declare type InferParametersFrom<TRoute> = TRoute extends Route<infer TParameters> ? TParameters : never;
|
|
3
3
|
declare type RequiredKeys<T> = Exclude<{
|
|
4
4
|
[K in keyof T]: T extends Record<K, T[K]> ? K : never;
|
package/dist/src/common/front-end-routing/routes/cluster-view/cluster-view-route.injectable.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ declare const clusterViewRouteInjectable: import("@ogre-tools/injectable").Injec
|
|
|
2
2
|
path: string;
|
|
3
3
|
clusterFrame: boolean;
|
|
4
4
|
isEnabled: import("mobx").IComputedValue<boolean>;
|
|
5
|
-
}, import("../../route-injection-token").Route<unknown>, void>;
|
|
5
|
+
}, import("../../front-end-route-injection-token").Route<unknown>, void>;
|
|
6
6
|
export default clusterViewRouteInjectable;
|
|
@@ -7,7 +7,13 @@ import { KubeObject } from "../kube-object";
|
|
|
7
7
|
import type { DerivedKubeApiOptions, IgnoredKubeApiOptions } from "../kube-api";
|
|
8
8
|
import { KubeApi } from "../kube-api";
|
|
9
9
|
export declare class ClusterApi extends KubeApi<Cluster> {
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated This field is legacy and never used.
|
|
12
|
+
*/
|
|
10
13
|
static kind: string;
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated This field is legacy and never used.
|
|
16
|
+
*/
|
|
11
17
|
static namespaced: boolean;
|
|
12
18
|
constructor(opts?: DerivedKubeApiOptions & IgnoredKubeApiOptions);
|
|
13
19
|
}
|
|
@@ -68,5 +74,6 @@ export interface Cluster {
|
|
|
68
74
|
export declare class Cluster extends KubeObject {
|
|
69
75
|
static kind: string;
|
|
70
76
|
static apiBase: string;
|
|
77
|
+
static namespaced: boolean;
|
|
71
78
|
getStatus(): ClusterStatus;
|
|
72
79
|
}
|
|
@@ -6,11 +6,13 @@ import type { BaseKubeObjectCondition, KubeObjectScope } from "../kube-object";
|
|
|
6
6
|
import { KubeObject } from "../kube-object";
|
|
7
7
|
import type { DerivedKubeApiOptions } from "../kube-api";
|
|
8
8
|
import { KubeApi } from "../kube-api";
|
|
9
|
+
import type { JSONSchemaProps } from "./types/json-schema-props";
|
|
9
10
|
interface AdditionalPrinterColumnsCommon {
|
|
10
11
|
name: string;
|
|
11
12
|
type: "integer" | "number" | "string" | "boolean" | "date";
|
|
12
|
-
priority
|
|
13
|
-
|
|
13
|
+
priority?: number;
|
|
14
|
+
format?: "int32" | "int64" | "float" | "double" | "byte" | "binary" | "date" | "date-time" | "password";
|
|
15
|
+
description?: string;
|
|
14
16
|
}
|
|
15
17
|
export declare type AdditionalPrinterColumnsV1 = AdditionalPrinterColumnsCommon & {
|
|
16
18
|
jsonPath: string;
|
|
@@ -18,11 +20,14 @@ export declare type AdditionalPrinterColumnsV1 = AdditionalPrinterColumnsCommon
|
|
|
18
20
|
declare type AdditionalPrinterColumnsV1Beta = AdditionalPrinterColumnsCommon & {
|
|
19
21
|
JSONPath: string;
|
|
20
22
|
};
|
|
23
|
+
export interface CustomResourceValidation {
|
|
24
|
+
openAPIV3Schema?: JSONSchemaProps;
|
|
25
|
+
}
|
|
21
26
|
export interface CustomResourceDefinitionVersion {
|
|
22
27
|
name: string;
|
|
23
28
|
served: boolean;
|
|
24
29
|
storage: boolean;
|
|
25
|
-
schema?:
|
|
30
|
+
schema?: CustomResourceValidation;
|
|
26
31
|
additionalPrinterColumns?: AdditionalPrinterColumnsV1[];
|
|
27
32
|
}
|
|
28
33
|
export interface CustomResourceDefinitionNames {
|
|
@@ -77,7 +77,7 @@ export interface IngressSpec {
|
|
|
77
77
|
}
|
|
78
78
|
export interface IngressStatus {
|
|
79
79
|
loadBalancer: {
|
|
80
|
-
ingress
|
|
80
|
+
ingress?: ILoadBalancerIngress[];
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
export declare class Ingress extends KubeObject<IngressStatus, IngressSpec, KubeObjectScope.Namespace> {
|
|
@@ -45,7 +45,7 @@ export interface IResourceMetrics<T extends MetricData> {
|
|
|
45
45
|
networkTransmit: T;
|
|
46
46
|
}
|
|
47
47
|
export declare const metricsApi: {
|
|
48
|
-
getMetrics<T = IMetricsQuery>(query: T, reqParams?: IMetricsReqParams): Promise<T extends object ? { [K in keyof
|
|
48
|
+
getMetrics<T = IMetricsQuery>(query: T, reqParams?: IMetricsReqParams): Promise<T extends object ? T extends infer T_1 ? { [K in keyof T_1]: MetricData; } : never : MetricData>;
|
|
49
49
|
getMetricProviders(): Promise<MetricProviderInfo[]>;
|
|
50
50
|
};
|
|
51
51
|
export declare function normalizeMetrics(metrics: MetricData | undefined | null, frames?: number): MetricData;
|
|
@@ -2,7 +2,7 @@
|
|
|
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 interface
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
export interface ExternalDocumentation {
|
|
6
|
+
description?: string;
|
|
7
|
+
url?: string;
|
|
8
8
|
}
|
|
@@ -0,0 +1,86 @@
|
|
|
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 { JsonValue } from "type-fest";
|
|
6
|
+
import type { ExternalDocumentation } from "./external-documentation";
|
|
7
|
+
export interface JSONSchemaProps {
|
|
8
|
+
$ref?: string;
|
|
9
|
+
$schema?: string;
|
|
10
|
+
additionalItems?: JSONSchemaProps | boolean;
|
|
11
|
+
additionalProperties?: JSONSchemaProps | boolean;
|
|
12
|
+
allOf?: JSONSchemaProps[];
|
|
13
|
+
anyOf?: JSONSchemaProps[];
|
|
14
|
+
/**
|
|
15
|
+
* default is a default value for undefined object fields.
|
|
16
|
+
* Defaulting is a beta feature under the CustomResourceDefaulting feature gate.
|
|
17
|
+
* Defaulting requires spec.preserveUnknownFields to be false.
|
|
18
|
+
*/
|
|
19
|
+
_default?: object;
|
|
20
|
+
definitions?: Partial<Record<string, JSONSchemaProps>>;
|
|
21
|
+
dependencies?: Partial<Record<string, object>>;
|
|
22
|
+
description?: string;
|
|
23
|
+
_enum?: object[];
|
|
24
|
+
example?: JsonValue;
|
|
25
|
+
exclusiveMaximum?: boolean;
|
|
26
|
+
exclusiveMinimum?: boolean;
|
|
27
|
+
externalDocs?: ExternalDocumentation;
|
|
28
|
+
/**
|
|
29
|
+
* format is an OpenAPI v3 format string.
|
|
30
|
+
* Unknown formats are ignored.
|
|
31
|
+
*
|
|
32
|
+
* The following formats are validated:
|
|
33
|
+
* - bsonobjectid: a bson object ID, i.e. a 24 characters hex string
|
|
34
|
+
* - uri: an URI as parsed by Golang net/url.ParseRequestURI
|
|
35
|
+
* - email: an email address as parsed by Golang net/mail.ParseAddress
|
|
36
|
+
* - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034].
|
|
37
|
+
* - ipv4: an IPv4 IP as parsed by Golang net.ParseIP
|
|
38
|
+
* - ipv6: an IPv6 IP as parsed by Golang net.ParseIP
|
|
39
|
+
* - cidr: a CIDR as parsed by Golang net.ParseCIDR
|
|
40
|
+
* - mac: a MAC address as parsed by Golang net.ParseMAC
|
|
41
|
+
* - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$
|
|
42
|
+
* - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$
|
|
43
|
+
* - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$
|
|
44
|
+
* - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$
|
|
45
|
+
* - isbn: an ISBN10 or ISBN13 number string like "0321751043" or "978-0321751041"
|
|
46
|
+
* - isbn10: an ISBN10 number string like "0321751043"
|
|
47
|
+
* - isbn13: an ISBN13 number string like "978-0321751041"
|
|
48
|
+
* - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in
|
|
49
|
+
* - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$
|
|
50
|
+
* - hexcolor: an hexadecimal color code like "#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$
|
|
51
|
+
* - rgbcolor: an RGB color code like rgb like "rgb(255,255,2559"
|
|
52
|
+
* - byte: base64 encoded binary data
|
|
53
|
+
* - password: any kind of string
|
|
54
|
+
* - date: a date string like "2006-01-02" as defined by full-date in RFC3339
|
|
55
|
+
* - duration: a duration string like "22 ns" as parsed by Golang time.ParseDuration or compatible with Scala duration format
|
|
56
|
+
* - datetime: a date time string like "2014-12-15T19:30:20.000Z" as defined by date-time in RFC3339.
|
|
57
|
+
*/
|
|
58
|
+
format?: string;
|
|
59
|
+
id?: string;
|
|
60
|
+
items?: JSONSchemaProps | JSONSchemaProps[];
|
|
61
|
+
maxItems?: number;
|
|
62
|
+
maxLength?: number;
|
|
63
|
+
maxProperties?: number;
|
|
64
|
+
maximum?: number;
|
|
65
|
+
minItems?: number;
|
|
66
|
+
minLength?: number;
|
|
67
|
+
minProperties?: number;
|
|
68
|
+
minimum?: number;
|
|
69
|
+
multipleOf?: number;
|
|
70
|
+
not?: JSONSchemaProps;
|
|
71
|
+
nullable?: boolean;
|
|
72
|
+
oneOf?: JSONSchemaProps[];
|
|
73
|
+
pattern?: string;
|
|
74
|
+
patternProperties?: Partial<Record<string, JSONSchemaProps>>;
|
|
75
|
+
properties?: Partial<Record<string, JSONSchemaProps>>;
|
|
76
|
+
required?: Array<string>;
|
|
77
|
+
title?: string;
|
|
78
|
+
type?: string;
|
|
79
|
+
uniqueItems?: boolean;
|
|
80
|
+
x_kubernetes_embedded_resource?: boolean;
|
|
81
|
+
x_kubernetes_int_or_string?: boolean;
|
|
82
|
+
x_kubernetes_list_map_keys?: string[];
|
|
83
|
+
x_kubernetes_list_type?: string;
|
|
84
|
+
x_kubernetes_map_type?: string;
|
|
85
|
+
x_kubernetes_preserve_unknown_fields?: boolean;
|
|
86
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
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
|
+
/// <reference types="node" />
|
|
5
6
|
import type { KubeObjectConstructor, KubeJsonApiDataFor, KubeObjectMetadata, KubeObjectScope } from "./kube-object";
|
|
6
7
|
import { KubeObject } from "./kube-object";
|
|
7
8
|
import type { IKubeWatchEvent } from "./kube-watch-event";
|
|
@@ -10,6 +11,7 @@ import { KubeJsonApi } from "./kube-json-api";
|
|
|
10
11
|
import type { Disposer } from "../utils";
|
|
11
12
|
import type { RequestInit } from "node-fetch";
|
|
12
13
|
import type AbortController from "abort-controller";
|
|
14
|
+
import { Agent } from "https";
|
|
13
15
|
import type { Patch } from "rfc6902";
|
|
14
16
|
import type { PartialDeep } from "type-fest";
|
|
15
17
|
/**
|
|
@@ -137,6 +139,13 @@ export interface IRemoteKubeApiConfig {
|
|
|
137
139
|
clientCertificateData?: string;
|
|
138
140
|
clientKeyData?: string;
|
|
139
141
|
};
|
|
142
|
+
/**
|
|
143
|
+
* Custom instance of https.agent to use for the requests
|
|
144
|
+
*
|
|
145
|
+
* @remarks the custom agent replaced default agent, options skipTLSVerify,
|
|
146
|
+
* clientCertificateData, clientKeyData and caData are ignored.
|
|
147
|
+
*/
|
|
148
|
+
agent?: Agent;
|
|
140
149
|
}
|
|
141
150
|
export declare function forCluster<Object extends KubeObject<any, any, KubeObjectScope>, Api extends KubeApi<Object>, Data extends KubeJsonApiDataFor<Object>>(cluster: ILocalKubeApiConfig, kubeClass: KubeObjectConstructor<Object, Data>, apiClass: new (apiOpts: KubeApiOptions<Object>) => Api): Api;
|
|
142
151
|
export declare function forCluster<Object extends KubeObject<any, any, KubeObjectScope>, Data extends KubeJsonApiDataFor<Object>>(cluster: ILocalKubeApiConfig, kubeClass: KubeObjectConstructor<Object, Data>, apiClass?: new (apiOpts: KubeApiOptions<Object>) => KubeApi<Object>): KubeApi<Object>;
|
|
@@ -59,7 +59,7 @@ export interface KubeObjectStoreOptions {
|
|
|
59
59
|
}
|
|
60
60
|
export declare type KubeApiDataFrom<K extends KubeObject, A> = A extends KubeApi<K, infer D> ? D extends KubeJsonApiDataFor<K> ? D : never : never;
|
|
61
61
|
export declare abstract class KubeObjectStore<K extends KubeObject = KubeObject, A extends KubeApi<K, D> = KubeApi<K, KubeJsonApiDataFor<K>>, D extends KubeJsonApiDataFor<K> = KubeApiDataFrom<K, A>> extends ItemStore<K> {
|
|
62
|
-
static readonly defaultContext: import("mobx").IObservableValue<ClusterContext>;
|
|
62
|
+
static readonly defaultContext: import("mobx").IObservableValue<ClusterContext | undefined>;
|
|
63
63
|
readonly api: A;
|
|
64
64
|
readonly limit: number | undefined;
|
|
65
65
|
readonly bufferSize: number;
|
|
@@ -71,7 +71,7 @@ export declare abstract class KubeObjectStore<K extends KubeObject = KubeObject,
|
|
|
71
71
|
cancel(): void;
|
|
72
72
|
};
|
|
73
73
|
constructor(api: A, opts?: KubeObjectStoreOptions);
|
|
74
|
-
get context(): ClusterContext;
|
|
74
|
+
get context(): ClusterContext | undefined;
|
|
75
75
|
get contextItems(): K[];
|
|
76
76
|
getTotalCount(): number;
|
|
77
77
|
get query(): KubeApiQueryParams;
|
|
@@ -23,7 +23,7 @@ export interface ConfigResult {
|
|
|
23
23
|
export declare function loadConfigFromString(content: string): ConfigResult;
|
|
24
24
|
export interface SplitConfigEntry {
|
|
25
25
|
config: KubeConfig;
|
|
26
|
-
|
|
26
|
+
validationResult: ValidateKubeConfigResult;
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* Breaks kube config into several configs. Each context as it own KubeConfig object
|
|
@@ -35,10 +35,18 @@ export declare function splitConfig(kubeConfig: KubeConfig): SplitConfigEntry[];
|
|
|
35
35
|
* @returns The yaml representation of the kubeconfig object
|
|
36
36
|
*/
|
|
37
37
|
export declare function dumpConfigYaml(kubeConfig: PartialDeep<KubeConfig>): string;
|
|
38
|
+
export declare type ValidateKubeConfigResult = {
|
|
39
|
+
error: Error;
|
|
40
|
+
} | {
|
|
41
|
+
error?: undefined;
|
|
42
|
+
context: Context;
|
|
43
|
+
cluster: Cluster;
|
|
44
|
+
user: User;
|
|
45
|
+
};
|
|
38
46
|
/**
|
|
39
47
|
* Checks if `config` has valid `Context`, `User`, `Cluster`, and `exec` fields (if present when required)
|
|
40
48
|
*
|
|
41
49
|
* Note: This function returns an error instead of throwing it, returning `undefined` if the validation passes
|
|
42
50
|
*/
|
|
43
|
-
export declare function validateKubeConfig(config: KubeConfig, contextName: string):
|
|
51
|
+
export declare function validateKubeConfig(config: KubeConfig, contextName: string): ValidateKubeConfigResult;
|
|
44
52
|
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
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 declare enum TerminalChannels {
|
|
6
|
+
STDIN = "stdin",
|
|
7
|
+
STDOUT = "stdout",
|
|
8
|
+
CONNECTED = "connected",
|
|
9
|
+
RESIZE = "resize",
|
|
10
|
+
PING = "ping"
|
|
11
|
+
}
|
|
12
|
+
export declare type TerminalMessage = {
|
|
13
|
+
type: TerminalChannels.STDIN;
|
|
14
|
+
data: string;
|
|
15
|
+
} | {
|
|
16
|
+
type: TerminalChannels.STDOUT;
|
|
17
|
+
data: string;
|
|
18
|
+
} | {
|
|
19
|
+
type: TerminalChannels.CONNECTED;
|
|
20
|
+
} | {
|
|
21
|
+
type: TerminalChannels.RESIZE;
|
|
22
|
+
data: {
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
25
|
+
};
|
|
26
|
+
} | {
|
|
27
|
+
type: TerminalChannels.PING;
|
|
28
|
+
};
|
|
@@ -33,11 +33,6 @@ export interface DownloadMirror {
|
|
|
33
33
|
}
|
|
34
34
|
export declare const defaultPackageMirror = "default";
|
|
35
35
|
export declare const packageMirrors: Map<string, DownloadMirror>;
|
|
36
|
-
export interface UpdateChannelInfo {
|
|
37
|
-
label: string;
|
|
38
|
-
}
|
|
39
|
-
export declare const updateChannels: import("type-fest/source/readonly-deep").ReadonlyMapDeep<string, UpdateChannelInfo>;
|
|
40
|
-
export declare const defaultUpdateChannel: string;
|
|
41
36
|
export declare type ExtensionRegistryLocation = "default" | "npmrc" | "custom";
|
|
42
37
|
export declare type ExtensionRegistry = {
|
|
43
38
|
location: "default" | "npmrc";
|
|
@@ -55,6 +50,8 @@ export declare type UserStoreFlatModel = {
|
|
|
55
50
|
};
|
|
56
51
|
export declare type UserPreferencesModel = {
|
|
57
52
|
[field in keyof typeof DESCRIPTORS]: PreferencesModelType<field>;
|
|
53
|
+
} & {
|
|
54
|
+
updateChannel: string;
|
|
58
55
|
};
|
|
59
56
|
export declare const DESCRIPTORS: {
|
|
60
57
|
httpsProxy: PreferenceDescription<string | undefined, string | undefined>;
|
|
@@ -74,7 +71,6 @@ export declare const DESCRIPTORS: {
|
|
|
74
71
|
editorConfiguration: PreferenceDescription<Partial<Required<BaseEditorConfiguration>> | undefined, Required<BaseEditorConfiguration>>;
|
|
75
72
|
terminalCopyOnSelect: PreferenceDescription<boolean, boolean>;
|
|
76
73
|
terminalConfig: PreferenceDescription<TerminalConfig, TerminalConfig>;
|
|
77
|
-
updateChannel: PreferenceDescription<string, string>;
|
|
78
74
|
extensionRegistryUrl: PreferenceDescription<ExtensionRegistry, ExtensionRegistry>;
|
|
79
75
|
};
|
|
80
76
|
export {};
|
|
@@ -5,13 +5,18 @@
|
|
|
5
5
|
import { BaseStore } from "../base-store";
|
|
6
6
|
import { DESCRIPTORS } from "./preferences-helpers";
|
|
7
7
|
import type { UserPreferencesModel, StoreType } from "./preferences-helpers";
|
|
8
|
+
import type { SelectedUpdateChannel } from "../application-update/selected-update-channel/selected-update-channel.injectable";
|
|
8
9
|
export interface UserStoreModel {
|
|
9
10
|
lastSeenAppVersion: string;
|
|
10
11
|
preferences: UserPreferencesModel;
|
|
11
12
|
}
|
|
13
|
+
interface Dependencies {
|
|
14
|
+
selectedUpdateChannel: SelectedUpdateChannel;
|
|
15
|
+
}
|
|
12
16
|
export declare class UserStore extends BaseStore<UserStoreModel> {
|
|
17
|
+
private readonly dependencies;
|
|
13
18
|
readonly displayName = "UserStore";
|
|
14
|
-
constructor();
|
|
19
|
+
constructor(dependencies: Dependencies);
|
|
15
20
|
lastSeenAppVersion: string;
|
|
16
21
|
/**
|
|
17
22
|
* used in add-cluster page for providing context
|
|
@@ -38,7 +43,6 @@ export declare class UserStore extends BaseStore<UserStoreModel> {
|
|
|
38
43
|
kubectlBinariesPath: StoreType<typeof DESCRIPTORS["kubectlBinariesPath"]>;
|
|
39
44
|
terminalCopyOnSelect: StoreType<typeof DESCRIPTORS["terminalCopyOnSelect"]>;
|
|
40
45
|
terminalConfig: StoreType<typeof DESCRIPTORS["terminalConfig"]>;
|
|
41
|
-
updateChannel: StoreType<typeof DESCRIPTORS["updateChannel"]>;
|
|
42
46
|
extensionRegistryUrl: StoreType<typeof DESCRIPTORS["extensionRegistryUrl"]>;
|
|
43
47
|
/**
|
|
44
48
|
* Download kubectl binaries matching cluster version
|
|
@@ -63,7 +67,6 @@ export declare class UserStore extends BaseStore<UserStoreModel> {
|
|
|
63
67
|
syncKubeconfigEntries: StoreType<typeof DESCRIPTORS["syncKubeconfigEntries"]>;
|
|
64
68
|
get isNewVersion(): boolean;
|
|
65
69
|
get resolvedShell(): string | undefined;
|
|
66
|
-
get isAllowedToDowngrade(): boolean;
|
|
67
70
|
startMainReactions(): void;
|
|
68
71
|
/**
|
|
69
72
|
* Checks if a column (by ID) for a table (by ID) is configured to be hidden
|
|
@@ -81,3 +84,4 @@ export declare class UserStore extends BaseStore<UserStoreModel> {
|
|
|
81
84
|
protected fromStore({ lastSeenAppVersion, preferences }?: Partial<UserStoreModel>): void;
|
|
82
85
|
toJSON(): UserStoreModel;
|
|
83
86
|
}
|
|
87
|
+
export {};
|
|
@@ -12,4 +12,4 @@ export interface URLParams<P extends object = {}, Q extends object = {}> {
|
|
|
12
12
|
fragment?: string;
|
|
13
13
|
}
|
|
14
14
|
export declare function buildURL<P extends object = {}, Q extends object = {}>(path: string, { params, query, fragment }?: URLParams<P, Q>): string;
|
|
15
|
-
export declare function buildURLPositional<P extends object = {}, Q extends object = {}>(path: string): (params?: P
|
|
15
|
+
export declare function buildURLPositional<P extends object = {}, Q extends object = {}>(path: string): (params?: P, query?: Q, fragment?: string) => string;
|
|
@@ -2,11 +2,11 @@
|
|
|
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 "abort-controller
|
|
5
|
+
import type { AbortSignal } from "abort-controller";
|
|
6
6
|
/**
|
|
7
7
|
* Creates a new promise that will be rejected when the signal rejects.
|
|
8
8
|
*
|
|
9
9
|
* Useful for `Promise.race()` applications.
|
|
10
10
|
* @param signal The AbortController's signal to reject with
|
|
11
11
|
*/
|
|
12
|
-
export declare function rejectPromiseBy(signal: AbortSignal): Promise<
|
|
12
|
+
export declare function rejectPromiseBy(signal: AbortSignal): Promise<never>;
|
|
@@ -0,0 +1,6 @@
|
|
|
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 declare type ResolveSystemProxy = (url: string) => Promise<string>;
|
|
6
|
+
export declare const resolveSystemProxyInjectionToken: import("@ogre-tools/injectable").InjectionToken<ResolveSystemProxy, void>;
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
4
|
*/
|
|
5
5
|
/// <reference types="node" />
|
|
6
|
+
/// <reference types="node" />
|
|
7
|
+
/// <reference types="node" />
|
|
8
|
+
/// <reference types="node" />
|
|
6
9
|
import type { ExecException, ExecFileException } from "child_process";
|
|
7
10
|
import type { IncomingMessage } from "http";
|
|
8
11
|
/**
|
|
@@ -96,6 +99,8 @@ export declare function bindPredicate<FnArgs extends any[], T>(fn: (arg1: unknow
|
|
|
96
99
|
export declare function hasDefiniteField<Field extends keyof T, T>(field: Field): (val: T) => val is T & {
|
|
97
100
|
[f in Field]-?: NonNullable<T[Field]>;
|
|
98
101
|
};
|
|
102
|
+
export declare function isPromiseSettledRejected<T>(result: PromiseSettledResult<T>): result is PromiseRejectedResult;
|
|
103
|
+
export declare function isPromiseSettledFulfilled<T>(result: PromiseSettledResult<T>): result is PromiseFulfilledResult<T>;
|
|
99
104
|
export declare function isErrnoException(error: unknown): error is NodeJS.ErrnoException;
|
|
100
105
|
export declare function isExecException(error: unknown): error is ExecException;
|
|
101
106
|
export declare function isExecFileException(error: unknown): error is ExecFileException;
|