@k8slens/extensions 5.3.1-git.cfa21deece.0 → 5.3.1-git.d40071a9d5.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/catalog-entity.d.ts +51 -0
- package/dist/src/common/catalog-entities/kubernetes-cluster.d.ts +1 -2
- package/dist/src/common/catalog-entities/web-link.d.ts +0 -2
- package/dist/src/common/cluster-types.d.ts +5 -1
- package/dist/src/common/hotbar-store.d.ts +16 -11
- package/dist/src/common/hotbar-store.injectable.d.ts +4 -0
- package/dist/src/common/hotbar-types.d.ts +5 -2
- package/dist/src/{extensions/registries/welcome-menu-registry.d.ts → common/ipc/catalog.d.ts} +9 -7
- package/dist/src/common/ipc/extension-loader.ipc.d.ts +21 -0
- package/dist/src/common/ipc/index.d.ts +2 -0
- package/dist/src/common/k8s-api/endpoints/crd.api.d.ts +29 -28
- package/dist/src/common/k8s-api/endpoints/daemon-set.api.d.ts +2 -5
- package/dist/src/common/k8s-api/endpoints/deployment.api.d.ts +2 -5
- package/dist/src/common/k8s-api/endpoints/job.api.d.ts +2 -5
- package/dist/src/common/k8s-api/endpoints/network-policy.api.d.ts +72 -32
- package/dist/src/common/k8s-api/endpoints/persistent-volume-claims.api.d.ts +3 -16
- package/dist/src/common/k8s-api/endpoints/poddisruptionbudget.api.d.ts +2 -6
- package/dist/src/common/k8s-api/endpoints/replica-set.api.d.ts +2 -5
- package/dist/src/common/k8s-api/endpoints/stateful-set.api.d.ts +2 -5
- package/dist/src/common/k8s-api/kube-api-parse.d.ts +2 -2
- package/dist/src/common/k8s-api/kube-api.d.ts +35 -8
- package/dist/src/common/k8s-api/kube-json-api.d.ts +1 -2
- package/dist/src/common/k8s-api/kube-object.d.ts +22 -0
- package/dist/src/common/protocol-handler/error.d.ts +3 -3
- package/dist/src/common/protocol-handler/router.d.ts +13 -7
- package/dist/src/common/user-store/preferences-helpers.d.ts +14 -0
- package/dist/src/common/user-store/user-store.d.ts +2 -1
- package/dist/src/common/utils/index.d.ts +1 -0
- package/dist/src/common/utils/promise-exec.d.ts +1 -2
- package/dist/src/common/utils/readableStream.d.ts +2 -2
- package/dist/src/common/vars.d.ts +1 -0
- package/dist/src/extensions/{registries/command-registry.d.ts → as-legacy-globals-for-extension-api/as-legacy-global-function-for-extension-api.d.ts} +5 -16
- package/dist/src/extensions/as-legacy-globals-for-extension-api/as-legacy-global-object-for-extension-api.d.ts +24 -0
- package/dist/src/{renderer/utils/copyToClipboard.d.ts → extensions/as-legacy-globals-for-extension-api/as-legacy-global-singleton-for-extension-api.d.ts} +7 -6
- package/dist/src/extensions/as-legacy-globals-for-extension-api/legacy-global-di-for-extension-api.d.ts +23 -0
- package/dist/src/extensions/extension-api.js +1094 -1035
- package/dist/src/extensions/extension-compatibility.d.ts +3 -1
- package/dist/src/extensions/extension-discovery.d.ts +3 -1
- package/dist/src/extensions/{extension-loader.d.ts → extension-loader/extension-loader.d.ts} +15 -7
- package/dist/src/extensions/extension-loader/extension-loader.injectable.d.ts +4 -0
- package/dist/src/{main/initializers/registries.d.ts → extensions/extension-loader/index.d.ts} +1 -1
- package/dist/src/extensions/extensions.injectable.d.ts +3 -0
- package/dist/src/{renderer/components → extensions}/getDiForUnitTesting.d.ts +0 -0
- package/dist/src/extensions/lens-extension.d.ts +2 -1
- package/dist/src/extensions/lens-main-extension.d.ts +3 -1
- package/dist/src/extensions/lens-renderer-extension.d.ts +14 -7
- package/dist/src/extensions/main-extensions.injectable.d.ts +5 -0
- package/dist/src/extensions/registries/base-registry.d.ts +1 -1
- package/dist/src/extensions/registries/entity-setting-registry.d.ts +1 -1
- package/dist/src/extensions/registries/index.d.ts +0 -5
- package/dist/src/extensions/registries/status-bar-registry.d.ts +6 -0
- package/dist/src/extensions/renderer-api/components.d.ts +1 -1
- package/dist/src/extensions/renderer-api/k8s-api.d.ts +1 -0
- package/dist/src/extensions/renderer-extensions.injectable.d.ts +5 -0
- package/dist/src/main/catalog-pusher.d.ts +1 -1
- package/dist/src/main/cluster-manager.d.ts +1 -1
- package/dist/src/main/getDi.d.ts +22 -0
- package/dist/src/main/getDiForUnitTesting.d.ts +22 -0
- package/dist/src/main/helm/helm-release-manager.d.ts +9 -10
- package/dist/src/main/helm/helm-repo-manager.d.ts +2 -2
- package/dist/src/main/helm/helm-service.d.ts +2 -2
- package/dist/src/main/initializers/index.d.ts +0 -1
- package/dist/src/main/initializers/ipc.d.ts +3 -1
- package/dist/src/main/lens-proxy.d.ts +8 -1
- package/dist/src/main/menu/electron-menu-items.injectable.d.ts +3 -0
- package/dist/src/main/menu/electron-menu-items.test.d.ts +1 -0
- package/dist/src/main/menu/menu.d.ts +33 -0
- package/dist/src/main/protocol-handler/index.d.ts +1 -1
- package/dist/src/main/protocol-handler/{router.d.ts → lens-protocol-router-main/lens-protocol-router-main.d.ts} +14 -8
- package/dist/src/main/protocol-handler/lens-protocol-router-main/lens-protocol-router-main.injectable.d.ts +4 -0
- package/dist/src/main/routes/port-forward-route.d.ts +0 -1
- package/dist/src/main/tray/tray-menu-items.injectable.d.ts +3 -0
- package/dist/src/main/tray/tray-menu-items.test.d.ts +1 -0
- package/dist/src/main/tray/tray.d.ts +27 -0
- package/dist/src/main/window-manager.d.ts +3 -0
- 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/{main/catalog-sources → renderer/api}/helpers/general-active-sync.d.ts +0 -0
- package/dist/src/renderer/api/terminal-api.d.ts +0 -2
- package/dist/src/renderer/bootstrap.d.ts +3 -1
- package/dist/src/renderer/cluster-frame.d.ts +2 -1
- package/dist/src/renderer/components/+catalog/catalog-entity-details.d.ts +3 -3
- package/dist/src/renderer/components/+catalog/catalog-entity-drawer-menu.d.ts +1 -2
- package/dist/src/renderer/components/+catalog/catalog-entity.store.d.ts +4 -4
- package/dist/src/renderer/components/+catalog/catalog.d.ts +5 -6
- package/dist/src/renderer/components/{command-palette/command-overlay.d.ts → +catalog/helpers.d.ts} +5 -7
- package/dist/src/renderer/components/+custom-resources/custom-resources.injectable.d.ts +23 -0
- package/dist/src/renderer/components/{clipboard/clipboard.d.ts → +extensions/attempt-install/attempt-install.d.ts} +11 -16
- package/dist/src/renderer/components/+extensions/attempt-install/attempt-install.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+extensions/attempt-install/create-temp-files-and-validate/create-temp-files-and-validate.d.ts +11 -0
- package/dist/src/renderer/components/+extensions/attempt-install/get-extension-dest-folder/get-extension-dest-folder.d.ts +1 -0
- package/dist/src/renderer/components/+extensions/attempt-install/unpack-extension/unpack-extension.d.ts +28 -0
- package/dist/src/renderer/components/+extensions/attempt-install/unpack-extension/unpack-extension.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+extensions/attempt-install/validate-package/validate-package.d.ts +22 -0
- package/dist/src/renderer/components/+extensions/attempt-install-by-info/attempt-install-by-info.d.ts +13 -0
- package/dist/src/renderer/components/+extensions/attempt-install-by-info/attempt-install-by-info.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+extensions/attempt-installs/attempt-installs.d.ts +6 -0
- package/dist/src/renderer/components/+extensions/attempt-installs/attempt-installs.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+extensions/confirm-uninstall-extension/confirm-uninstall-extension.d.ts +7 -0
- package/dist/src/renderer/components/+extensions/confirm-uninstall-extension/confirm-uninstall-extension.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+extensions/disable-extension/disable-extension.d.ts +27 -0
- package/dist/src/renderer/components/+extensions/disable-extension/disable-extension.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+extensions/enable-extension/enable-extension.d.ts +27 -0
- package/dist/src/renderer/components/+extensions/enable-extension/enable-extension.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+extensions/extensions.d.ts +1 -15
- package/dist/src/{extensions/registries/menu-registry.d.ts → renderer/components/+extensions/get-base-registry-url/get-base-registry-url.d.ts} +5 -6
- package/dist/src/renderer/components/+extensions/get-base-registry-url/get-base-registry-url.injectable.d.ts +23 -0
- package/dist/src/renderer/components/+extensions/get-message-from-error/get-message-from-error.d.ts +21 -0
- package/dist/src/renderer/components/+extensions/install-from-input/install-from-input.d.ts +29 -0
- package/dist/src/renderer/components/+extensions/install-from-input/install-from-input.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+extensions/install-from-select-file-dialog/install-from-select-file-dialog.d.ts +5 -0
- package/dist/src/renderer/components/+extensions/install-from-select-file-dialog/install-from-select-file-dialog.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+extensions/install-on-drop/install-on-drop.d.ts +5 -0
- package/dist/src/renderer/components/+extensions/install-on-drop/install-on-drop.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+extensions/read-file-notify/read-file-notify.d.ts +2 -0
- package/dist/src/renderer/components/+extensions/supported-extension-formats.d.ts +21 -0
- package/dist/src/renderer/components/+extensions/uninstall-extension/uninstall-extension.d.ts +27 -0
- package/dist/src/renderer/components/+extensions/uninstall-extension/uninstall-extension.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+extensions/user-extensions/user-extensions.injectable.d.ts +3 -0
- package/dist/src/renderer/{initializers/command-registry.d.ts → components/+network-policies/__tests__/network-policy-details.test.d.ts} +1 -1
- package/dist/src/renderer/components/+network-policies/network-policy-details.d.ts +8 -4
- 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/+preferences/extension-settings.d.ts +7 -0
- package/dist/src/renderer/components/+preferences/preferences.d.ts +0 -2
- package/dist/src/renderer/components/+welcome/welcome-banner-items/welcome-banner-items.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+welcome/welcome-menu-items/get-welcome-menu-items.d.ts +27 -0
- package/dist/src/renderer/components/+welcome/welcome-menu-items/welcome-menu-items.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+welcome/welcome.d.ts +1 -3
- package/dist/src/renderer/components/+workloads-pods/pod-container-port.d.ts +1 -0
- package/dist/src/renderer/components/activate-entity-command/activate-entity-command.d.ts +1 -9
- package/dist/src/renderer/components/{layout/__tests__/topbar.test.d.ts → avatar/__tests__/avatar.test.d.ts} +0 -0
- package/dist/src/renderer/components/avatar/avatar.d.ts +7 -8
- package/dist/src/renderer/components/{clipboard → avatar}/index.d.ts +1 -1
- package/dist/src/renderer/components/catalog-entities/weblink-add-command.d.ts +1 -11
- package/dist/src/renderer/components/checkbox/checkbox.d.ts +0 -1
- package/dist/src/renderer/components/cluster-manager/active-hotbar-name.d.ts +22 -0
- package/dist/src/renderer/components/cluster-manager/bottom-bar.d.ts +0 -1
- package/dist/src/renderer/components/command-palette/command-container.d.ts +1 -7
- package/dist/src/renderer/components/command-palette/command-dialog.d.ts +1 -13
- package/dist/src/renderer/components/command-palette/command-overlay.injectable.d.ts +31 -0
- package/dist/src/renderer/components/command-palette/index.d.ts +1 -1
- package/dist/src/renderer/components/command-palette/registered-commands/internal-commands.injectable.d.ts +25 -0
- package/dist/src/renderer/components/command-palette/registered-commands/registered-commands.injectable.d.ts +25 -0
- package/dist/src/renderer/components/dialog/dialog.d.ts +1 -0
- package/dist/src/renderer/components/dock/install-chart.d.ts +0 -1
- package/dist/src/renderer/components/dock/terminal.d.ts +1 -1
- package/dist/src/renderer/components/hotbar/hotbar-add-command.d.ts +1 -6
- package/dist/src/renderer/components/hotbar/hotbar-entity-icon.d.ts +3 -3
- package/dist/src/renderer/components/hotbar/hotbar-icon.d.ts +3 -10
- package/dist/src/renderer/components/hotbar/hotbar-menu.d.ts +1 -1
- package/dist/src/renderer/components/hotbar/hotbar-remove-command.d.ts +1 -9
- package/dist/src/renderer/components/hotbar/hotbar-rename-command.d.ts +1 -14
- package/dist/src/renderer/components/hotbar/hotbar-selector.d.ts +3 -3
- package/dist/src/renderer/components/hotbar/hotbar-switch-command.d.ts +1 -12
- package/dist/src/renderer/components/input/input.d.ts +1 -0
- package/dist/src/renderer/components/input/validators/unique-hotbar-name.injectable.d.ts +24 -0
- package/dist/src/renderer/components/kube-object-menu/dependencies/api-manager.injectable.d.ts +3 -0
- package/dist/src/{main/tray.d.ts → renderer/components/kube-object-menu/dependencies/cluster-name.injectable.d.ts} +3 -5
- package/dist/src/renderer/components/kube-object-menu/dependencies/cluster.injectable.d.ts +3 -0
- package/dist/src/renderer/components/kube-object-menu/dependencies/edit-resource-tab.injectable.d.ts +24 -0
- package/dist/src/renderer/components/kube-object-menu/dependencies/hide-details.injectable.d.ts +24 -0
- package/dist/src/renderer/components/kube-object-menu/dependencies/kube-object-menu-items/get-kube-object-menu-items.d.ts +26 -0
- package/dist/src/renderer/components/kube-object-menu/dependencies/kube-object-menu-items/kube-object-menu-items.injectable.d.ts +9 -0
- package/dist/src/renderer/components/kube-object-menu/dependencies/kube-object-menu-items/kube-object-menu-registry.injectable.d.ts +24 -0
- package/dist/src/renderer/components/kube-object-menu/index.d.ts +2 -1
- package/dist/src/renderer/components/kube-object-menu/kube-object-menu.d.ts +4 -13
- package/dist/src/renderer/components/kube-object-menu/kube-object-menu.test.d.ts +21 -0
- package/dist/src/renderer/components/kubeconfig-dialog/kubeconfig-dialog.d.ts +0 -1
- package/dist/src/renderer/components/layout/{topbar.d.ts → close-button.d.ts} +3 -3
- package/dist/src/renderer/components/layout/top-bar/top-bar-items/top-bar-items.injectable.d.ts +3 -0
- package/dist/src/renderer/components/layout/top-bar/top-bar-win-linux.test.d.ts +21 -0
- package/dist/src/renderer/components/layout/top-bar/top-bar.d.ts +22 -0
- package/dist/src/renderer/components/layout/top-bar/top-bar.test.d.ts +21 -0
- 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/components/switch/__tests__/switch.test.d.ts +21 -0
- package/dist/src/renderer/components/switch/form-switcher.d.ts +3 -0
- package/dist/src/renderer/components/switch/index.d.ts +1 -0
- package/dist/src/{extensions/registries/topbar-registry.d.ts → renderer/components/switch/switch.d.ts} +4 -9
- package/dist/src/renderer/components/switch/switcher.d.ts +4 -1
- package/dist/src/renderer/components/test-utils/renderFor.d.ts +27 -0
- package/dist/src/renderer/{components/hotbar/hotbar-display-label.d.ts → getDi.d.ts} +2 -2
- package/dist/src/renderer/{components/getDi.d.ts → getDiForUnitTesting.d.ts} +2 -2
- package/dist/src/renderer/initializers/catalog.d.ts +6 -1
- package/dist/src/renderer/initializers/index.d.ts +1 -2
- package/dist/src/renderer/initializers/ipc.d.ts +2 -1
- package/dist/src/renderer/initializers/status-bar-registry.d.ts +21 -0
- package/dist/src/renderer/navigation/helpers.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/{main/menu.d.ts → renderer/protocol-handler/bind-protocol-add-route-handlers/bind-protocol-add-route-handlers.d.ts} +8 -6
- package/dist/src/renderer/protocol-handler/bind-protocol-add-route-handlers/bind-protocol-add-route-handlers.injectable.d.ts +3 -0
- package/dist/src/renderer/protocol-handler/index.d.ts +2 -2
- package/dist/src/renderer/protocol-handler/{router.d.ts → lens-protocol-router-renderer/lens-protocol-router-renderer.d.ts} +8 -1
- package/dist/src/renderer/protocol-handler/lens-protocol-router-renderer/lens-protocol-router-renderer.injectable.d.ts +4 -0
- package/dist/src/renderer/root-frame.d.ts +3 -1
- package/dist/src/renderer/theme.store.d.ts +0 -1
- package/dist/src/renderer/utils/index.d.ts +0 -1
- package/dist/src/{extensions/registries/welcome-banner-registry.d.ts → renderer/window/event-listener.injectable.d.ts} +5 -18
- package/package.json +1 -1
- package/dist/src/renderer/initializers/welcome-menu-registry.d.ts +0 -21
- package/dist/src/renderer/protocol-handler/app-handlers.d.ts +0 -21
|
@@ -24,9 +24,14 @@ import { KubeJsonApi, KubeJsonApiData } from "./kube-json-api";
|
|
|
24
24
|
import type { RequestInit } from "node-fetch";
|
|
25
25
|
import AbortController from "abort-controller";
|
|
26
26
|
import type { Patch } from "rfc6902";
|
|
27
|
+
/**
|
|
28
|
+
* The options used for creating a `KubeApi`
|
|
29
|
+
*/
|
|
27
30
|
export interface IKubeApiOptions<T extends KubeObject> {
|
|
28
31
|
/**
|
|
29
32
|
* base api-path for listing all resources, e.g. "/api/v1/pods"
|
|
33
|
+
*
|
|
34
|
+
* If not specified then will be the one on the `objectConstructor`
|
|
30
35
|
*/
|
|
31
36
|
apiBase?: string;
|
|
32
37
|
/**
|
|
@@ -36,11 +41,29 @@ export interface IKubeApiOptions<T extends KubeObject> {
|
|
|
36
41
|
* This option only has effect if checkPreferredVersion is true.
|
|
37
42
|
*/
|
|
38
43
|
fallbackApiBases?: string[];
|
|
44
|
+
/**
|
|
45
|
+
* If `true` then will check all declared apiBases against the kube api server
|
|
46
|
+
* for the first accepted one.
|
|
47
|
+
*/
|
|
48
|
+
checkPreferredVersion?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* The constructor for the kube objects returned from the API
|
|
51
|
+
*/
|
|
39
52
|
objectConstructor: KubeObjectConstructor<T>;
|
|
53
|
+
/**
|
|
54
|
+
* The api instance to use for making requests
|
|
55
|
+
*
|
|
56
|
+
* @default apiKube
|
|
57
|
+
*/
|
|
40
58
|
request?: KubeJsonApi;
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated should be specified by `objectConstructor`
|
|
61
|
+
*/
|
|
41
62
|
isNamespaced?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* @deprecated should be specified by `objectConstructor`
|
|
65
|
+
*/
|
|
42
66
|
kind?: string;
|
|
43
|
-
checkPreferredVersion?: boolean;
|
|
44
67
|
}
|
|
45
68
|
export interface IKubeApiQueryParams {
|
|
46
69
|
watch?: boolean | number;
|
|
@@ -81,6 +104,9 @@ export declare type PropagationPolicy = undefined | "Orphan" | "Foreground" | "B
|
|
|
81
104
|
*/
|
|
82
105
|
export interface IKubeApiCluster extends ILocalKubeApiConfig {
|
|
83
106
|
}
|
|
107
|
+
export declare type PartialKubeObject<T extends KubeObject> = Partial<Omit<T, "metadata">> & {
|
|
108
|
+
metadata?: Partial<T["metadata"]>;
|
|
109
|
+
};
|
|
84
110
|
export interface IRemoteKubeApiConfig {
|
|
85
111
|
cluster: {
|
|
86
112
|
server: string;
|
|
@@ -129,11 +155,11 @@ export interface DeleteResourceDescriptor extends ResourceDescriptor {
|
|
|
129
155
|
export declare class KubeApi<T extends KubeObject> {
|
|
130
156
|
protected options: IKubeApiOptions<T>;
|
|
131
157
|
readonly kind: string;
|
|
132
|
-
readonly apiBase: string;
|
|
133
|
-
readonly apiPrefix: string;
|
|
134
|
-
readonly apiGroup: string;
|
|
135
158
|
readonly apiVersion: string;
|
|
136
|
-
|
|
159
|
+
apiBase: string;
|
|
160
|
+
apiPrefix: string;
|
|
161
|
+
apiGroup: string;
|
|
162
|
+
apiVersionPreferred?: string;
|
|
137
163
|
readonly apiResource: string;
|
|
138
164
|
readonly isNamespaced: boolean;
|
|
139
165
|
objectConstructor: KubeObjectConstructor<T>;
|
|
@@ -156,14 +182,15 @@ export declare class KubeApi<T extends KubeObject> {
|
|
|
156
182
|
setResourceVersion(namespace: string, newVersion: string): void;
|
|
157
183
|
getResourceVersion(namespace?: string): string;
|
|
158
184
|
refreshResourceVersion(params?: KubeApiListOptions): Promise<T[]>;
|
|
185
|
+
private computeApiBase;
|
|
159
186
|
getUrl({ name, namespace }?: Partial<ResourceDescriptor>, query?: Partial<IKubeApiQueryParams>): string;
|
|
160
187
|
protected normalizeQuery(query?: Partial<IKubeApiQueryParams>): Partial<IKubeApiQueryParams>;
|
|
161
188
|
protected parseResponse(data: unknown, namespace?: string): T | T[] | null;
|
|
162
189
|
list({ namespace, reqInit }?: KubeApiListOptions, query?: IKubeApiQueryParams): Promise<T[] | null>;
|
|
163
190
|
get(desc: ResourceDescriptor, query?: IKubeApiQueryParams): Promise<T | null>;
|
|
164
|
-
create({ name, namespace }: Partial<ResourceDescriptor>, data?:
|
|
165
|
-
update({ name, namespace }: ResourceDescriptor, data:
|
|
166
|
-
patch(desc: ResourceDescriptor, data?:
|
|
191
|
+
create({ name, namespace }: Partial<ResourceDescriptor>, data?: PartialKubeObject<T>): Promise<T | null>;
|
|
192
|
+
update({ name, namespace }: ResourceDescriptor, data: PartialKubeObject<T>): Promise<T | null>;
|
|
193
|
+
patch(desc: ResourceDescriptor, data?: PartialKubeObject<T> | Patch, strategy?: KubeApiPatchType): Promise<T>;
|
|
167
194
|
delete({ propagationPolicy, ...desc }: DeleteResourceDescriptor): Promise<KubeJsonApiData>;
|
|
168
195
|
getWatchUrl(namespace?: string, query?: IKubeApiQueryParams): string;
|
|
169
196
|
watch(opts?: KubeApiWatchOptions): () => void;
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import { JsonApi, JsonApiData, JsonApiError } from "./json-api";
|
|
22
22
|
import type { Response } from "node-fetch";
|
|
23
|
-
import type { Cluster } from "../../main/cluster";
|
|
24
23
|
export interface KubeJsonApiListMetadata {
|
|
25
24
|
resourceVersion: string;
|
|
26
25
|
selfLink?: string;
|
|
@@ -64,6 +63,6 @@ export interface KubeJsonApiError extends JsonApiError {
|
|
|
64
63
|
};
|
|
65
64
|
}
|
|
66
65
|
export declare class KubeJsonApi extends JsonApi<KubeJsonApiData> {
|
|
67
|
-
static forCluster(
|
|
66
|
+
static forCluster(clusterId: string): KubeJsonApi;
|
|
68
67
|
protected parseError(error: KubeJsonApiError | any, res: Response): string[];
|
|
69
68
|
}
|
|
@@ -81,6 +81,28 @@ export declare class KubeCreationError extends Error {
|
|
|
81
81
|
data: any;
|
|
82
82
|
constructor(message: string, data: any);
|
|
83
83
|
}
|
|
84
|
+
export declare type LabelMatchExpression = {
|
|
85
|
+
/**
|
|
86
|
+
* The label key that the selector applies to.
|
|
87
|
+
*/
|
|
88
|
+
key: string;
|
|
89
|
+
} & ({
|
|
90
|
+
/**
|
|
91
|
+
* This represents the key's relationship to a set of values.
|
|
92
|
+
*/
|
|
93
|
+
operator: "Exists" | "DoesNotExist";
|
|
94
|
+
values?: undefined;
|
|
95
|
+
} | {
|
|
96
|
+
operator: "In" | "NotIn";
|
|
97
|
+
/**
|
|
98
|
+
* The set of values for to match according to the operator for the label.
|
|
99
|
+
*/
|
|
100
|
+
values: string[];
|
|
101
|
+
});
|
|
102
|
+
export interface LabelSelector {
|
|
103
|
+
matchLabels?: Record<string, string | undefined>;
|
|
104
|
+
matchExpressions?: LabelMatchExpression[];
|
|
105
|
+
}
|
|
84
106
|
export declare class KubeObject<Metadata extends KubeObjectMetadata = KubeObjectMetadata, Status = any, Spec = any> implements ItemObject {
|
|
85
107
|
static readonly kind?: string;
|
|
86
108
|
static readonly namespaced?: boolean;
|
|
@@ -27,13 +27,13 @@ export declare enum RoutingErrorType {
|
|
|
27
27
|
NO_EXTENSION_ID = "no-ext-id",
|
|
28
28
|
MISSING_EXTENSION = "missing-ext"
|
|
29
29
|
}
|
|
30
|
-
export declare class RoutingError extends Error {
|
|
30
|
+
export declare class RoutingError<Query> extends Error {
|
|
31
31
|
type: RoutingErrorType;
|
|
32
|
-
url: Url
|
|
32
|
+
url: Url<Query>;
|
|
33
33
|
/**
|
|
34
34
|
* Will be set if the routing error originated in an extension route table
|
|
35
35
|
*/
|
|
36
36
|
extensionName?: string;
|
|
37
|
-
constructor(type: RoutingErrorType, url: Url);
|
|
37
|
+
constructor(type: RoutingErrorType, url: Url<Query>);
|
|
38
38
|
toString(): string;
|
|
39
39
|
}
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
20
|
*/
|
|
21
21
|
import { match } from "react-router";
|
|
22
|
-
import { Singleton } from "../utils";
|
|
23
22
|
import type Url from "url-parse";
|
|
23
|
+
import type { ExtensionLoader as ExtensionLoaderType } from "../../extensions/extension-loader/extension-loader";
|
|
24
24
|
import type { LensExtension } from "../../extensions/lens-extension";
|
|
25
25
|
import type { RouteHandler } from "../../extensions/registries/protocol-handler";
|
|
26
26
|
export declare const ProtocolHandlerIpcPrefix = "protocol-handler";
|
|
@@ -54,29 +54,34 @@ export declare enum RouteAttempt {
|
|
|
54
54
|
MISSING_EXTENSION = "no-extension"
|
|
55
55
|
}
|
|
56
56
|
export declare function foldAttemptResults(mainAttempt: RouteAttempt, rendererAttempt: RouteAttempt): RouteAttempt;
|
|
57
|
-
|
|
57
|
+
interface Dependencies {
|
|
58
|
+
extensionLoader: ExtensionLoaderType;
|
|
59
|
+
}
|
|
60
|
+
export declare abstract class LensProtocolRouter {
|
|
61
|
+
protected dependencies: Dependencies;
|
|
58
62
|
protected internalRoutes: Map<string, RouteHandler>;
|
|
59
63
|
static readonly LoggingPrefix = "[PROTOCOL ROUTER]";
|
|
60
64
|
static readonly ExtensionUrlSchema: string;
|
|
65
|
+
constructor(dependencies: Dependencies);
|
|
61
66
|
/**
|
|
62
67
|
* Attempts to route the given URL to all internal routes that have been registered
|
|
63
68
|
* @param url the parsed URL that initiated the `lens://` protocol
|
|
64
69
|
* @returns true if a route has been found
|
|
65
70
|
*/
|
|
66
|
-
protected _routeToInternal(url: Url): RouteAttempt;
|
|
71
|
+
protected _routeToInternal(url: Url<Record<string, string>>): RouteAttempt;
|
|
67
72
|
/**
|
|
68
73
|
* match against all matched URIs, returning either the first exact match or
|
|
69
74
|
* the most specific match if none are exact.
|
|
70
75
|
* @param routes the array of path schemas, handler pairs to match against
|
|
71
76
|
* @param url the url (in its current state)
|
|
72
77
|
*/
|
|
73
|
-
protected _findMatchingRoute(routes: Iterable<[string, RouteHandler]>, url: Url): null | [match<Record<string, string>>, RouteHandler];
|
|
78
|
+
protected _findMatchingRoute(routes: Iterable<[string, RouteHandler]>, url: Url<Record<string, string>>): null | [match<Record<string, string>>, RouteHandler];
|
|
74
79
|
/**
|
|
75
80
|
* find the most specific matching handler and call it
|
|
76
81
|
* @param routes the array of (path schemas, handler) pairs to match against
|
|
77
82
|
* @param url the url (in its current state)
|
|
78
83
|
*/
|
|
79
|
-
protected _route(routes: Iterable<[string, RouteHandler]>, url: Url, extensionName?: string): RouteAttempt;
|
|
84
|
+
protected _route(routes: Iterable<[string, RouteHandler]>, url: Url<Record<string, string>>, extensionName?: string): RouteAttempt;
|
|
80
85
|
/**
|
|
81
86
|
* Tries to find the matching LensExtension instance
|
|
82
87
|
*
|
|
@@ -84,7 +89,7 @@ export declare abstract class LensProtocolRouter extends Singleton {
|
|
|
84
89
|
* @param url the protocol request URI that was "open"-ed
|
|
85
90
|
* @returns either the found name or the instance of `LensExtension`
|
|
86
91
|
*/
|
|
87
|
-
protected _findMatchingExtensionByName(url: Url): Promise<LensExtension | string>;
|
|
92
|
+
protected _findMatchingExtensionByName(url: Url<Record<string, string>>): Promise<LensExtension | string>;
|
|
88
93
|
/**
|
|
89
94
|
* Find a matching extension by the first one or two path segments of `url` and then try to `_route`
|
|
90
95
|
* its correspondingly registered handlers.
|
|
@@ -95,7 +100,7 @@ export declare abstract class LensProtocolRouter extends Singleton {
|
|
|
95
100
|
* Note: this function modifies its argument, do not reuse
|
|
96
101
|
* @param url the protocol request URI that was "open"-ed
|
|
97
102
|
*/
|
|
98
|
-
protected _routeToExtension(url: Url): Promise<RouteAttempt>;
|
|
103
|
+
protected _routeToExtension(url: Url<Record<string, string>>): Promise<RouteAttempt>;
|
|
99
104
|
/**
|
|
100
105
|
* Add a handler under the `lens://app` tree of routing.
|
|
101
106
|
* @param pathSchema the URI path schema to match against for this handler
|
|
@@ -108,3 +113,4 @@ export declare abstract class LensProtocolRouter extends Singleton {
|
|
|
108
113
|
*/
|
|
109
114
|
removeInternalHandler(urlSchema: string): void;
|
|
110
115
|
}
|
|
116
|
+
export {};
|
|
@@ -39,6 +39,19 @@ export interface DownloadMirror {
|
|
|
39
39
|
}
|
|
40
40
|
export declare const defaultPackageMirror = "default";
|
|
41
41
|
export declare const packageMirrors: Map<string, DownloadMirror>;
|
|
42
|
+
export declare enum ExtensionRegistryLocation {
|
|
43
|
+
DEFAULT = "default",
|
|
44
|
+
NPMRC = "npmrc",
|
|
45
|
+
CUSTOM = "custom"
|
|
46
|
+
}
|
|
47
|
+
export declare type ExtensionRegistry = {
|
|
48
|
+
location: ExtensionRegistryLocation.DEFAULT | ExtensionRegistryLocation.NPMRC;
|
|
49
|
+
customUrl?: undefined;
|
|
50
|
+
} | {
|
|
51
|
+
location: ExtensionRegistryLocation.CUSTOM;
|
|
52
|
+
customUrl: string;
|
|
53
|
+
};
|
|
54
|
+
export declare const defaultExtensionRegistryUrl = "https://registry.npmjs.org";
|
|
42
55
|
declare type PreferencesModelType<field extends keyof typeof DESCRIPTORS> = typeof DESCRIPTORS[field] extends PreferenceDescription<infer T, any> ? T : never;
|
|
43
56
|
declare type UserStoreModelType<field extends keyof typeof DESCRIPTORS> = typeof DESCRIPTORS[field] extends PreferenceDescription<any, infer T> ? T : never;
|
|
44
57
|
export declare type UserStoreFlatModel = {
|
|
@@ -65,6 +78,7 @@ export declare const DESCRIPTORS: {
|
|
|
65
78
|
editorConfiguration: PreferenceDescription<EditorConfiguration, EditorConfiguration>;
|
|
66
79
|
terminalCopyOnSelect: PreferenceDescription<boolean, boolean>;
|
|
67
80
|
updateChannel: PreferenceDescription<string, string>;
|
|
81
|
+
extensionRegistryUrl: PreferenceDescription<ExtensionRegistry, ExtensionRegistry>;
|
|
68
82
|
};
|
|
69
83
|
export declare const CONSTANTS: {
|
|
70
84
|
updateChannels: Map<string, {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import { BaseStore } from "../base-store";
|
|
22
22
|
import { ObservableToggleSet } from "../../renderer/utils";
|
|
23
|
-
import { EditorConfiguration, KubeconfigSyncValue, UserPreferencesModel } from "./preferences-helpers";
|
|
23
|
+
import { EditorConfiguration, ExtensionRegistry, KubeconfigSyncValue, UserPreferencesModel } from "./preferences-helpers";
|
|
24
24
|
export interface UserStoreModel {
|
|
25
25
|
lastSeenAppVersion: string;
|
|
26
26
|
preferences: UserPreferencesModel;
|
|
@@ -47,6 +47,7 @@ export declare class UserStore extends BaseStore<UserStoreModel> {
|
|
|
47
47
|
kubectlBinariesPath?: string;
|
|
48
48
|
terminalCopyOnSelect: boolean;
|
|
49
49
|
updateChannel?: string;
|
|
50
|
+
extensionRegistryUrl: ExtensionRegistry;
|
|
50
51
|
/**
|
|
51
52
|
* Download kubectl binaries matching cluster version
|
|
52
53
|
*/
|
|
@@ -19,6 +19,5 @@
|
|
|
19
19
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
20
|
*/
|
|
21
21
|
/// <reference types="node" />
|
|
22
|
-
import {
|
|
23
|
-
export declare const promiseExec: typeof exec.__promisify__;
|
|
22
|
+
import { execFile } from "child_process";
|
|
24
23
|
export declare const promiseExecFile: typeof execFile.__promisify__;
|
|
@@ -39,7 +39,7 @@ export declare class ReadableWebToNodeStream<T extends TypedArray> extends Reada
|
|
|
39
39
|
private pendingRead;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
|
-
* @param stream
|
|
42
|
+
* @param stream ReadableStream: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream
|
|
43
43
|
*/
|
|
44
44
|
constructor(stream: ReadableStream<T>);
|
|
45
45
|
/**
|
|
@@ -50,7 +50,7 @@ export declare class ReadableWebToNodeStream<T extends TypedArray> extends Reada
|
|
|
50
50
|
*/
|
|
51
51
|
_read(): Promise<void>;
|
|
52
52
|
/**
|
|
53
|
-
* If there is no unresolved read call to Web-API
|
|
53
|
+
* If there is no unresolved read call to Web-API ReadableStream immediately returns;
|
|
54
54
|
* otherwise will wait until the read is resolved.
|
|
55
55
|
*/
|
|
56
56
|
waitForReadToComplete(): Promise<void>;
|
|
@@ -33,6 +33,7 @@ export declare const isIntegrationTesting: boolean;
|
|
|
33
33
|
export declare const productName: string;
|
|
34
34
|
export declare const appName: string;
|
|
35
35
|
export declare const publicPath: string;
|
|
36
|
+
export declare const defaultTheme: string;
|
|
36
37
|
export declare const contextDir: string;
|
|
37
38
|
export declare const buildDir: string;
|
|
38
39
|
export declare const preloadEntrypoint: string;
|
|
@@ -18,19 +18,8 @@
|
|
|
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 {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
export
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
export interface CommandRegistration {
|
|
28
|
-
id: string;
|
|
29
|
-
title: string;
|
|
30
|
-
scope: "entity" | "global";
|
|
31
|
-
action: (context: CommandContext) => void;
|
|
32
|
-
isActive?: (context: CommandContext) => boolean;
|
|
33
|
-
}
|
|
34
|
-
export declare class CommandRegistry extends BaseRegistry<CommandRegistration> {
|
|
35
|
-
add(items: CommandRegistration | CommandRegistration[], extension?: LensExtension): () => void;
|
|
36
|
-
}
|
|
21
|
+
import type { Injectable } from "@ogre-tools/injectable";
|
|
22
|
+
declare type TentativeTuple<T> = T extends object ? [T] : [undefined?];
|
|
23
|
+
declare type FactoryType = <TInjectable extends Injectable<unknown, TInstance, TInstantiationParameter>, TInstantiationParameter, TInstance extends (...args: unknown[]) => any, TFunction extends (...args: unknown[]) => any = Awaited<ReturnType<TInjectable["instantiate"]>>>(injectableKey: TInjectable, ...instantiationParameter: TentativeTuple<TInstantiationParameter>) => (...args: Parameters<TFunction>) => ReturnType<TFunction>;
|
|
24
|
+
export declare const asLegacyGlobalFunctionForExtensionApi: FactoryType;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
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 type { Injectable } from "@ogre-tools/injectable";
|
|
22
|
+
declare type TentativeTuple<T> = T extends object ? [T] : [undefined?];
|
|
23
|
+
export declare const asLegacyGlobalObjectForExtensionApi: <TInjectable extends Injectable<unknown, unknown, TInstantiationParameter>, TInstantiationParameter>(injectableKey: TInjectable, ...instantiationParameter: TentativeTuple<TInstantiationParameter>) => ReturnType<TInjectable["instantiate"]>;
|
|
24
|
+
export {};
|
|
@@ -18,10 +18,11 @@
|
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
import type { Injectable } from "@ogre-tools/injectable";
|
|
22
|
+
declare type TentativeTuple<T> = T extends object ? [T] : [undefined?];
|
|
23
|
+
export declare const asLegacyGlobalSingletonForExtensionApi: <TClass extends abstract new (...args: any[]) => any, TInjectable extends Injectable<unknown, unknown, TInstantiationParameter>, TInstantiationParameter>(Class: TClass, injectableKey: TInjectable, ...instantiationParameter: TentativeTuple<TInstantiationParameter>) => InstanceType<TClass> & {
|
|
24
|
+
getInstance: () => InstanceType<TClass>;
|
|
25
|
+
createInstance: () => InstanceType<TClass>;
|
|
26
|
+
resetInstance: () => void;
|
|
27
27
|
};
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
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 type { DependencyInjectionContainer } from "@ogre-tools/injectable";
|
|
22
|
+
export declare const setLegacyGlobalDiForExtensionApi: (di: DependencyInjectionContainer) => void;
|
|
23
|
+
export declare const getLegacyGlobalDiForExtensionApi: () => DependencyInjectionContainer;
|