@k8slens/extensions 5.3.1-git.495e80cd45.0 → 5.3.1-git.541c00cf24.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.
Files changed (79) hide show
  1. package/dist/src/common/ipc/update-available.ipc.d.ts +2 -0
  2. package/dist/src/common/k8s-api/cluster-context.d.ts +1 -0
  3. package/dist/src/common/k8s-api/endpoints/daemon-set.api.d.ts +2 -5
  4. package/dist/src/common/k8s-api/endpoints/deployment.api.d.ts +2 -5
  5. package/dist/src/common/k8s-api/endpoints/job.api.d.ts +2 -5
  6. package/dist/src/common/k8s-api/endpoints/metrics.api.d.ts +2 -0
  7. package/dist/src/common/k8s-api/endpoints/network-policy.api.d.ts +72 -32
  8. package/dist/src/common/k8s-api/endpoints/nodes.api.d.ts +6 -6
  9. package/dist/src/common/k8s-api/endpoints/persistent-volume-claims.api.d.ts +3 -16
  10. package/dist/src/common/k8s-api/endpoints/poddisruptionbudget.api.d.ts +2 -6
  11. package/dist/src/common/k8s-api/endpoints/pods.api.d.ts +2 -0
  12. package/dist/src/common/k8s-api/endpoints/replica-set.api.d.ts +2 -5
  13. package/dist/src/common/k8s-api/endpoints/stateful-set.api.d.ts +2 -5
  14. package/dist/src/common/k8s-api/kube-api-parse.d.ts +2 -2
  15. package/dist/src/common/k8s-api/kube-api.d.ts +58 -30
  16. package/dist/src/common/k8s-api/kube-json-api.d.ts +1 -2
  17. package/dist/src/common/k8s-api/kube-object.d.ts +25 -2
  18. package/dist/src/common/k8s-api/kube-object.store.d.ts +11 -7
  19. package/dist/src/common/k8s-api/kube-watch-api.d.ts +7 -30
  20. package/dist/src/common/protocol-handler/error.d.ts +3 -3
  21. package/dist/src/common/protocol-handler/router.d.ts +5 -5
  22. package/dist/src/extensions/extension-api.js +187 -69
  23. package/dist/src/extensions/registries/status-bar-registry.d.ts +6 -0
  24. package/dist/src/extensions/renderer-api/k8s-api.d.ts +1 -0
  25. package/dist/src/main/cluster.d.ts +3 -7
  26. package/dist/src/main/context-handler.d.ts +8 -1
  27. package/dist/src/main/kube-auth-proxy.d.ts +5 -7
  28. package/dist/src/main/kubeconfig-manager.d.ts +16 -4
  29. package/dist/src/main/protocol-handler/router.d.ts +3 -3
  30. package/dist/src/renderer/components/+events/kube-event-details.d.ts +1 -1
  31. package/dist/src/renderer/components/+namespaces/namespace-details.d.ts +0 -1
  32. package/dist/src/renderer/components/+namespaces/namespace-select.d.ts +0 -1
  33. package/dist/src/renderer/components/+namespaces/namespace.store.d.ts +1 -1
  34. package/dist/src/renderer/components/+network-ingresses/ingress-details.d.ts +1 -1
  35. package/dist/src/renderer/components/+network-policies/__tests__/network-policy-details.test.d.ts +21 -0
  36. package/dist/src/renderer/components/+network-policies/network-policy-details.d.ts +5 -4
  37. package/dist/src/renderer/components/+nodes/node-details.d.ts +1 -2
  38. package/dist/src/renderer/components/+nodes/nodes.d.ts +2 -1
  39. package/dist/src/renderer/components/+storage-classes/storage-class-details.d.ts +1 -1
  40. package/dist/src/renderer/components/+storage-volume-claims/volume-claim-details.d.ts +1 -1
  41. package/dist/src/renderer/components/+workloads-cronjobs/cronjob-details.d.ts +1 -1
  42. package/dist/src/renderer/components/+workloads-daemonsets/daemonset-details.d.ts +0 -1
  43. package/dist/src/renderer/components/+workloads-deployments/deployment-details.d.ts +0 -1
  44. package/dist/src/renderer/components/+workloads-jobs/job-details.d.ts +1 -1
  45. package/dist/src/renderer/components/+workloads-overview/overview.d.ts +2 -0
  46. package/dist/src/renderer/components/+workloads-replicasets/replicaset-details.d.ts +1 -2
  47. package/dist/src/renderer/components/+workloads-statefulsets/statefulset-details.d.ts +0 -1
  48. package/dist/src/renderer/components/avatar/__tests__/avatar.test.d.ts +21 -0
  49. package/dist/src/renderer/components/avatar/avatar.d.ts +7 -8
  50. package/dist/src/renderer/components/avatar/index.d.ts +21 -0
  51. package/dist/src/renderer/components/cluster-manager/active-hotbar-name.d.ts +21 -0
  52. package/dist/src/renderer/components/cluster-manager/bottom-bar.d.ts +0 -1
  53. package/dist/src/renderer/components/context.d.ts +8 -1
  54. package/dist/src/renderer/components/dialog/dialog.d.ts +1 -0
  55. package/dist/src/renderer/components/drawer/drawer.d.ts +14 -3
  56. package/dist/src/renderer/components/hotbar/hotbar-entity-icon.d.ts +3 -3
  57. package/dist/src/renderer/components/hotbar/hotbar-icon.d.ts +3 -10
  58. package/dist/src/renderer/components/hotbar/hotbar-menu.d.ts +3 -0
  59. package/dist/src/renderer/components/kube-object-list-layout/kube-object-list-layout.d.ts +2 -0
  60. package/dist/src/renderer/components/kube-object-menu/dependencies/api-manager.injectable.d.ts +24 -0
  61. package/dist/src/renderer/components/kube-object-menu/dependencies/cluster-name.injectable.d.ts +27 -0
  62. package/dist/src/renderer/components/kube-object-menu/dependencies/cluster.injectable.d.ts +4 -0
  63. package/dist/src/renderer/components/kube-object-menu/dependencies/edit-resource-tab.injectable.d.ts +24 -0
  64. package/dist/src/renderer/components/kube-object-menu/dependencies/hide-details.injectable.d.ts +24 -0
  65. package/dist/src/renderer/components/kube-object-menu/dependencies/kube-object-menu-items/get-kube-object-menu-items.d.ts +29 -0
  66. package/dist/src/renderer/components/kube-object-menu/dependencies/kube-object-menu-items/kube-object-menu-items.injectable.d.ts +24 -0
  67. package/dist/src/renderer/components/kube-object-menu/dependencies/kube-object-menu-items/kube-object-menu-registry.injectable.d.ts +24 -0
  68. package/dist/src/renderer/components/kube-object-menu/index.d.ts +2 -1
  69. package/dist/src/renderer/components/kube-object-menu/kube-object-menu-container.d.ts +2 -0
  70. package/dist/src/renderer/components/kube-object-menu/kube-object-menu.d.ts +14 -4
  71. package/dist/src/renderer/components/kube-object-menu/kube-object-menu.injectable.d.ts +5 -0
  72. package/dist/src/renderer/components/kube-object-menu/kube-object-menu.test.d.ts +21 -0
  73. package/dist/src/renderer/components/resizing-anchor/resizing-anchor.d.ts +3 -1
  74. package/dist/src/renderer/components/switch/switcher.d.ts +1 -1
  75. package/dist/src/renderer/components/test-utils/renderFor.d.ts +27 -0
  76. package/dist/src/renderer/initializers/index.d.ts +1 -0
  77. package/dist/src/renderer/initializers/status-bar-registry.d.ts +21 -0
  78. package/dist/src/renderer/port-forward/port-forward.store.d.ts +1 -1
  79. package/package.json +1 -1
@@ -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 KubeWatchPreloadOptions {
30
+ export interface KubeWatchSubscribeStoreOptions {
32
31
  /**
33
32
  * The namespaces to watch
34
- * @default all-accessible
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
- context: ClusterContext;
67
- constructor();
68
- isAllowedApi(api: KubeApi<KubeObject>): boolean;
69
- preloadStores(stores: KubeObjectStore<KubeObject>[], { loadOnce, namespaces, onLoadFailure }?: KubeWatchPreloadOptions): {
70
- loading: Promise<PromiseSettledResult<any>[]>;
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 {};
@@ -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
  }
@@ -63,20 +63,20 @@ export declare abstract class LensProtocolRouter extends Singleton {
63
63
  * @param url the parsed URL that initiated the `lens://` protocol
64
64
  * @returns true if a route has been found
65
65
  */
66
- protected _routeToInternal(url: Url): RouteAttempt;
66
+ protected _routeToInternal(url: Url<Record<string, string>>): RouteAttempt;
67
67
  /**
68
68
  * match against all matched URIs, returning either the first exact match or
69
69
  * the most specific match if none are exact.
70
70
  * @param routes the array of path schemas, handler pairs to match against
71
71
  * @param url the url (in its current state)
72
72
  */
73
- protected _findMatchingRoute(routes: Iterable<[string, RouteHandler]>, url: Url): null | [match<Record<string, string>>, RouteHandler];
73
+ protected _findMatchingRoute(routes: Iterable<[string, RouteHandler]>, url: Url<Record<string, string>>): null | [match<Record<string, string>>, RouteHandler];
74
74
  /**
75
75
  * find the most specific matching handler and call it
76
76
  * @param routes the array of (path schemas, handler) pairs to match against
77
77
  * @param url the url (in its current state)
78
78
  */
79
- protected _route(routes: Iterable<[string, RouteHandler]>, url: Url, extensionName?: string): RouteAttempt;
79
+ protected _route(routes: Iterable<[string, RouteHandler]>, url: Url<Record<string, string>>, extensionName?: string): RouteAttempt;
80
80
  /**
81
81
  * Tries to find the matching LensExtension instance
82
82
  *
@@ -84,7 +84,7 @@ export declare abstract class LensProtocolRouter extends Singleton {
84
84
  * @param url the protocol request URI that was "open"-ed
85
85
  * @returns either the found name or the instance of `LensExtension`
86
86
  */
87
- protected _findMatchingExtensionByName(url: Url): Promise<LensExtension | string>;
87
+ protected _findMatchingExtensionByName(url: Url<Record<string, string>>): Promise<LensExtension | string>;
88
88
  /**
89
89
  * Find a matching extension by the first one or two path segments of `url` and then try to `_route`
90
90
  * its correspondingly registered handlers.
@@ -95,7 +95,7 @@ export declare abstract class LensProtocolRouter extends Singleton {
95
95
  * Note: this function modifies its argument, do not reuse
96
96
  * @param url the protocol request URI that was "open"-ed
97
97
  */
98
- protected _routeToExtension(url: Url): Promise<RouteAttempt>;
98
+ protected _routeToExtension(url: Url<Record<string, string>>): Promise<RouteAttempt>;
99
99
  /**
100
100
  * Add a handler under the `lens://app` tree of routing.
101
101
  * @param pathSchema the URI path schema to match against for this handler