@k8slens/extensions 5.2.1-git.e5c9c9a4b5.0 → 5.2.3
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-category-registry.d.ts +0 -9
- package/dist/src/common/catalog/catalog-entity.d.ts +0 -18
- package/dist/src/common/custom-errors.d.ts +1 -1
- package/dist/src/common/k8s-api/kube-api.d.ts +2 -20
- package/dist/src/extensions/extension-api.js +164 -243
- package/dist/src/extensions/lens-renderer-extension.d.ts +2 -9
- package/dist/src/extensions/main-api/k8s-api.d.ts +2 -2
- package/dist/src/extensions/renderer-api/k8s-api.d.ts +2 -2
- package/dist/src/renderer/api/catalog-category-registry.d.ts +0 -1
- package/dist/src/renderer/api/catalog-entity-registry.d.ts +3 -1
- package/dist/src/renderer/components/+add-cluster/add-cluster.d.ts +1 -3
- package/dist/src/renderer/components/+catalog/catalog-menu.d.ts +1 -1
- package/dist/src/renderer/components/input/input.d.ts +1 -1
- package/dist/src/renderer/components/switch/switcher.d.ts +1 -1
- package/package.json +1 -1
- package/dist/src/common/catalog-entities/__tests__/kubernetes-cluster.test.d.ts +0 -1
- package/dist/src/main/utils/__test__/update-channel.test.d.ts +0 -21
- package/dist/src/main/utils/update-channel.d.ts +0 -21
- package/dist/src/renderer/components/+catalog/__tests__/catalog-add-button.test.d.ts +0 -1
|
@@ -20,24 +20,15 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import { Disposer, ExtendedMap } from "../utils";
|
|
22
22
|
import { CatalogCategory, CatalogEntityData, CatalogEntityKindData } from "./catalog-entity";
|
|
23
|
-
export declare type CategoryFilter = (category: CatalogCategory) => any;
|
|
24
23
|
export declare class CatalogCategoryRegistry {
|
|
25
24
|
protected categories: import("mobx").ObservableSet<CatalogCategory>;
|
|
26
25
|
protected groupKinds: ExtendedMap<string, ExtendedMap<string, CatalogCategory>>;
|
|
27
|
-
protected filters: import("mobx").ObservableSet<CategoryFilter>;
|
|
28
26
|
constructor();
|
|
29
27
|
add(category: CatalogCategory): Disposer;
|
|
30
28
|
get items(): CatalogCategory[];
|
|
31
|
-
get filteredItems(): CatalogCategory[];
|
|
32
29
|
getForGroupKind<T extends CatalogCategory>(group: string, kind: string): T | undefined;
|
|
33
30
|
getEntityForData(data: CatalogEntityData & CatalogEntityKindData): import("./catalog-entity").CatalogEntity<import("./catalog-entity").CatalogEntityMetadata, import("./catalog-entity").CatalogEntityStatus, import("./catalog-entity").CatalogEntitySpec>;
|
|
34
31
|
getCategoryForEntity<T extends CatalogCategory>(data: CatalogEntityData & CatalogEntityKindData): T | undefined;
|
|
35
32
|
getByName(name: string): CatalogCategory;
|
|
36
|
-
/**
|
|
37
|
-
* Add a new filter to the set of category filters
|
|
38
|
-
* @param fn The function that should return a truthy value if that category should be displayed
|
|
39
|
-
* @returns A function to remove that filter
|
|
40
|
-
*/
|
|
41
|
-
addCatalogCategoryFilter(fn: CategoryFilter): Disposer;
|
|
42
33
|
}
|
|
43
34
|
export declare const catalogCategoryRegistry: CatalogCategoryRegistry;
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
*/
|
|
21
21
|
/// <reference types="react" />
|
|
22
22
|
import type TypedEmitter from "typed-emitter";
|
|
23
|
-
import { Disposer } from "../utils";
|
|
24
23
|
declare type ExtractEntityMetadataType<Entity> = Entity extends CatalogEntity<infer Metadata> ? Metadata : never;
|
|
25
24
|
declare type ExtractEntityStatusType<Entity> = Entity extends CatalogEntity<any, infer Status> ? Status : never;
|
|
26
25
|
declare type ExtractEntitySpecType<Entity> = Entity extends CatalogEntity<any, any, infer Spec> ? Spec : never;
|
|
@@ -36,10 +35,6 @@ export interface CatalogCategorySpec {
|
|
|
36
35
|
kind: string;
|
|
37
36
|
};
|
|
38
37
|
}
|
|
39
|
-
/**
|
|
40
|
-
* If the filter returns true, the menu item is displayed
|
|
41
|
-
*/
|
|
42
|
-
export declare type AddMenuFilter = (menu: CatalogEntityAddMenu) => any;
|
|
43
38
|
export interface CatalogCategoryEvents {
|
|
44
39
|
load: () => void;
|
|
45
40
|
catalogAddMenu: (context: CatalogEntityAddMenuContext) => void;
|
|
@@ -54,24 +49,11 @@ export declare abstract class CatalogCategory extends CatalogCategory_base {
|
|
|
54
49
|
icon: string;
|
|
55
50
|
};
|
|
56
51
|
abstract spec: CatalogCategorySpec;
|
|
57
|
-
protected filters: import("mobx").ObservableSet<AddMenuFilter>;
|
|
58
52
|
static parseId(id?: string): {
|
|
59
53
|
group?: string;
|
|
60
54
|
kind?: string;
|
|
61
55
|
};
|
|
62
56
|
getId(): string;
|
|
63
|
-
/**
|
|
64
|
-
* Add a filter for menu items of catalogAddMenu
|
|
65
|
-
* @param fn The function that should return a truthy value if that menu item should be displayed
|
|
66
|
-
* @returns A function to remove that filter
|
|
67
|
-
*/
|
|
68
|
-
addMenuFilter(fn: AddMenuFilter): Disposer;
|
|
69
|
-
/**
|
|
70
|
-
* Filter menuItems according to the Category's set filters
|
|
71
|
-
* @param menuItems menu items to filter
|
|
72
|
-
* @returns filtered menu items
|
|
73
|
-
*/
|
|
74
|
-
filteredItems(menuItems: CatalogEntityAddMenu[]): CatalogEntityAddMenu[];
|
|
75
57
|
}
|
|
76
58
|
export interface CatalogEntityMetadata {
|
|
77
59
|
uid: string;
|
|
@@ -69,30 +69,12 @@ export interface IKubeResourceList {
|
|
|
69
69
|
verbs: string[];
|
|
70
70
|
}[];
|
|
71
71
|
}
|
|
72
|
-
export interface
|
|
72
|
+
export interface IKubeApiCluster {
|
|
73
73
|
metadata: {
|
|
74
74
|
uid: string;
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
* @deprecated
|
|
79
|
-
*/
|
|
80
|
-
export interface IKubeApiCluster extends ILocalKubeApiConfig {
|
|
81
|
-
}
|
|
82
|
-
export interface IRemoteKubeApiConfig {
|
|
83
|
-
cluster: {
|
|
84
|
-
server: string;
|
|
85
|
-
caData?: string;
|
|
86
|
-
skipTLSVerify?: boolean;
|
|
87
|
-
};
|
|
88
|
-
user: {
|
|
89
|
-
token?: string;
|
|
90
|
-
clientCertificateData?: string;
|
|
91
|
-
clientKeyData?: string;
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
export declare function forCluster<T extends KubeObject>(cluster: ILocalKubeApiConfig, kubeClass: KubeObjectConstructor<T>): KubeApi<T>;
|
|
95
|
-
export declare function forRemoteCluster<T extends KubeObject>(config: IRemoteKubeApiConfig, kubeClass: KubeObjectConstructor<T>): KubeApi<T>;
|
|
77
|
+
export declare function forCluster<T extends KubeObject>(cluster: IKubeApiCluster, kubeClass: KubeObjectConstructor<T>): KubeApi<T>;
|
|
96
78
|
export declare function ensureObjectSelfLink(api: KubeApi<KubeObject>, object: KubeJsonApiData): void;
|
|
97
79
|
export declare type KubeApiWatchCallback = (data: IKubeWatchEvent<KubeJsonApiData>, error: any) => void;
|
|
98
80
|
export declare type KubeApiWatchOptions = {
|