@k8slens/extensions 5.3.1-git.aab48a784c.0 → 5.3.1-git.bb30bdc750.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/k8s-api/cluster-context.d.ts +1 -0
- package/dist/src/common/k8s-api/endpoints/metrics.api.d.ts +2 -0
- package/dist/src/common/k8s-api/endpoints/pods.api.d.ts +2 -0
- package/dist/src/common/k8s-api/kube-object.d.ts +3 -2
- package/dist/src/common/k8s-api/kube-object.store.d.ts +11 -7
- package/dist/src/common/k8s-api/kube-watch-api.d.ts +7 -30
- package/dist/src/extensions/extension-api.js +651 -2103
- package/dist/src/renderer/components/+events/kube-event-details.d.ts +1 -1
- package/dist/src/renderer/components/+namespaces/namespace-details.d.ts +0 -1
- package/dist/src/renderer/components/+namespaces/namespace-select.d.ts +0 -1
- package/dist/src/renderer/components/+namespaces/namespace.store.d.ts +1 -1
- package/dist/src/renderer/components/+network-ingresses/ingress-details.d.ts +1 -1
- package/dist/src/renderer/components/+nodes/node-details.d.ts +1 -2
- package/dist/src/renderer/components/+storage-classes/storage-class-details.d.ts +1 -1
- package/dist/src/renderer/components/+storage-volume-claims/volume-claim-details.d.ts +1 -1
- package/dist/src/renderer/components/+workloads-cronjobs/cronjob-details.d.ts +1 -1
- package/dist/src/renderer/components/+workloads-daemonsets/daemonset-details.d.ts +0 -1
- package/dist/src/renderer/components/+workloads-deployments/deployment-details.d.ts +0 -1
- package/dist/src/renderer/components/+workloads-jobs/job-details.d.ts +1 -1
- package/dist/src/renderer/components/+workloads-overview/overview.d.ts +2 -0
- package/dist/src/renderer/components/+workloads-replicasets/replicaset-details.d.ts +1 -2
- package/dist/src/renderer/components/+workloads-statefulsets/statefulset-details.d.ts +0 -1
- package/dist/src/renderer/components/context.d.ts +8 -1
- package/dist/src/renderer/components/hotbar/hotbar-menu.d.ts +3 -0
- package/dist/src/renderer/components/kube-object-list-layout/kube-object-list-layout.d.ts +2 -0
- package/dist/src/renderer/port-forward/port-forward.store.d.ts +1 -1
- package/package.json +1 -1
|
@@ -82,8 +82,9 @@ export declare class KubeCreationError extends Error {
|
|
|
82
82
|
constructor(message: string, data: any);
|
|
83
83
|
}
|
|
84
84
|
export declare class KubeObject<Metadata extends KubeObjectMetadata = KubeObjectMetadata, Status = any, Spec = any> implements ItemObject {
|
|
85
|
-
static readonly kind
|
|
86
|
-
static readonly namespaced
|
|
85
|
+
static readonly kind?: string;
|
|
86
|
+
static readonly namespaced?: boolean;
|
|
87
|
+
static readonly apiBase?: string;
|
|
87
88
|
apiVersion: string;
|
|
88
89
|
kind: string;
|
|
89
90
|
metadata: Metadata;
|
|
@@ -25,10 +25,10 @@ import { ItemStore } from "../item.store";
|
|
|
25
25
|
import { IKubeApiQueryParams, KubeApi } from "./kube-api";
|
|
26
26
|
import type { KubeJsonApiData } from "./kube-json-api";
|
|
27
27
|
import type { RequestInit } from "node-fetch";
|
|
28
|
+
import AbortController from "abort-controller";
|
|
28
29
|
import type { Patch } from "rfc6902";
|
|
29
|
-
export interface KubeObjectStoreLoadingParams
|
|
30
|
+
export interface KubeObjectStoreLoadingParams {
|
|
30
31
|
namespaces: string[];
|
|
31
|
-
api?: KubeApi<K>;
|
|
32
32
|
reqInit?: RequestInit;
|
|
33
33
|
/**
|
|
34
34
|
* A function that is called when listing fails. If set then blocks errors
|
|
@@ -52,6 +52,10 @@ export interface KubeObjectStoreSubscribeParams {
|
|
|
52
52
|
* being rejected with
|
|
53
53
|
*/
|
|
54
54
|
onLoadFailure?: (err: any) => void;
|
|
55
|
+
/**
|
|
56
|
+
* An optional parent abort controller
|
|
57
|
+
*/
|
|
58
|
+
abortController?: AbortController;
|
|
55
59
|
}
|
|
56
60
|
export declare abstract class KubeObjectStore<T extends KubeObject> extends ItemStore<T> {
|
|
57
61
|
static defaultContext: import("mobx").IObservableValue<ClusterContext>;
|
|
@@ -78,16 +82,16 @@ export declare abstract class KubeObjectStore<T extends KubeObject> extends Item
|
|
|
78
82
|
getByLabel(labels: string[] | {
|
|
79
83
|
[label: string]: string;
|
|
80
84
|
}): T[];
|
|
81
|
-
protected loadItems({ namespaces,
|
|
85
|
+
protected loadItems({ namespaces, reqInit, onLoadFailure }: KubeObjectStoreLoadingParams): Promise<T[]>;
|
|
82
86
|
protected filterItemsOnLoad(items: T[]): T[];
|
|
83
|
-
loadAll(
|
|
87
|
+
loadAll({ namespaces, merge, reqInit, onLoadFailure }?: KubeObjectStoreLoadAllParams): Promise<void | T[]>;
|
|
84
88
|
reloadAll(opts?: {
|
|
85
89
|
force?: boolean;
|
|
86
90
|
namespaces?: string[];
|
|
87
91
|
merge?: boolean;
|
|
88
92
|
}): Promise<void | T[]>;
|
|
89
|
-
protected mergeItems(partialItems: T[], {
|
|
90
|
-
|
|
93
|
+
protected mergeItems(partialItems: T[], { merge, updateStore, sort, filter }?: {
|
|
94
|
+
merge?: boolean;
|
|
91
95
|
updateStore?: boolean;
|
|
92
96
|
sort?: boolean;
|
|
93
97
|
filter?: boolean;
|
|
@@ -117,7 +121,7 @@ export declare abstract class KubeObjectStore<T extends KubeObject> extends Item
|
|
|
117
121
|
removeSelectedItems(): Promise<void[]>;
|
|
118
122
|
protected eventsBuffer: import("mobx").IObservableArray<IKubeWatchEvent<KubeJsonApiData>>;
|
|
119
123
|
protected bindWatchEventsUpdater(delay?: number): void;
|
|
120
|
-
subscribe(
|
|
124
|
+
subscribe({ onLoadFailure, abortController }?: KubeObjectStoreSubscribeParams): () => void;
|
|
121
125
|
private watchNamespace;
|
|
122
126
|
protected updateFromEventsBuffer(): void;
|
|
123
127
|
}
|
|
@@ -21,57 +21,34 @@
|
|
|
21
21
|
import type { KubeObjectStore } from "./kube-object.store";
|
|
22
22
|
import type { ClusterContext } from "./cluster-context";
|
|
23
23
|
import { Disposer } from "../utils";
|
|
24
|
-
import type { KubeApi } from "./kube-api";
|
|
25
24
|
import type { KubeJsonApiData } from "./kube-json-api";
|
|
26
25
|
import type { KubeObject } from "./kube-object";
|
|
27
26
|
export interface IKubeWatchEvent<T extends KubeJsonApiData> {
|
|
28
27
|
type: "ADDED" | "MODIFIED" | "DELETED" | "ERROR";
|
|
29
28
|
object?: T;
|
|
30
29
|
}
|
|
31
|
-
interface
|
|
30
|
+
export interface KubeWatchSubscribeStoreOptions {
|
|
32
31
|
/**
|
|
33
32
|
* The namespaces to watch
|
|
34
|
-
* @default all
|
|
33
|
+
* @default all selected namespaces
|
|
35
34
|
*/
|
|
36
35
|
namespaces?: string[];
|
|
37
|
-
/**
|
|
38
|
-
* Whether to skip loading if the store is already loaded
|
|
39
|
-
* @default false
|
|
40
|
-
*/
|
|
41
|
-
loadOnce?: boolean;
|
|
42
36
|
/**
|
|
43
37
|
* A function that is called when listing fails. If set then blocks errors
|
|
44
38
|
* being rejected with
|
|
45
39
|
*/
|
|
46
40
|
onLoadFailure?: (err: any) => void;
|
|
47
41
|
}
|
|
48
|
-
export interface KubeWatchSubscribeStoreOptions extends KubeWatchPreloadOptions {
|
|
49
|
-
/**
|
|
50
|
-
* Whether to subscribe only after loading all stores
|
|
51
|
-
* @default true
|
|
52
|
-
*/
|
|
53
|
-
waitUntilLoaded?: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Whether to preload the stores before watching
|
|
56
|
-
* @default true
|
|
57
|
-
*/
|
|
58
|
-
preload?: boolean;
|
|
59
|
-
}
|
|
60
42
|
export interface IKubeWatchLog {
|
|
61
43
|
message: string | string[] | Error;
|
|
62
44
|
meta?: object;
|
|
63
45
|
cssStyle?: string;
|
|
64
46
|
}
|
|
65
47
|
export declare class KubeWatchApi {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
cancelLoading: () => void;
|
|
72
|
-
};
|
|
73
|
-
subscribeStores(stores: KubeObjectStore<KubeObject>[], opts?: KubeWatchSubscribeStoreOptions): Disposer;
|
|
74
|
-
protected log({ message, cssStyle, meta }: IKubeWatchLog): void;
|
|
48
|
+
#private;
|
|
49
|
+
static context: ClusterContext;
|
|
50
|
+
private subscribeStore;
|
|
51
|
+
subscribeStores(stores: KubeObjectStore<KubeObject>[], { namespaces, onLoadFailure }?: KubeWatchSubscribeStoreOptions): Disposer;
|
|
52
|
+
protected log(message: any, meta: any): void;
|
|
75
53
|
}
|
|
76
54
|
export declare const kubeWatchApi: KubeWatchApi;
|
|
77
|
-
export {};
|