@k8slens/extensions 5.3.1-git.bb30bdc750.0 → 5.3.1-git.cd2f5094dc.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.
@@ -20,6 +20,8 @@
20
20
  */
21
21
  import type { UpdateInfo } from "electron-updater";
22
22
  export declare const UpdateAvailableChannel = "update-available";
23
+ export declare const AutoUpdateChecking = "auto-update:checking";
24
+ export declare const AutoUpdateNoUpdateAvailable = "auto-update:no-update";
23
25
  export declare const AutoUpdateLogPrefix = "[UPDATE-CHECKER]";
24
26
  export declare type UpdateAvailableFromMain = [backChannel: string, updateInfo: UpdateInfo];
25
27
  export declare function areArgsUpdateAvailableFromMain(args: unknown[]): args is UpdateAvailableFromMain;
@@ -66,17 +66,17 @@ export interface Node {
66
66
  status: {
67
67
  capacity?: {
68
68
  cpu: string;
69
- ["ephemeral-storage"]: string;
70
- ["hugepages-1Gi"]: string;
71
- ["hugepages-2Mi"]: string;
69
+ "ephemeral-storage": string;
70
+ "hugepages-1Gi": string;
71
+ "hugepages-2Mi": string;
72
72
  memory: string;
73
73
  pods: string;
74
74
  };
75
75
  allocatable?: {
76
76
  cpu: string;
77
- ["ephemeral-storage"]: string;
78
- ["hugepages-1Gi"]: string;
79
- ["hugepages-2Mi"]: string;
77
+ "ephemeral-storage": string;
78
+ "hugepages-1Gi": string;
79
+ "hugepages-2Mi": string;
80
80
  memory: string;
81
81
  pods: string;
82
82
  };
@@ -106,6 +106,26 @@ export declare type KubeApiWatchOptions = {
106
106
  timeout?: number;
107
107
  };
108
108
  export declare type KubeApiPatchType = "merge" | "json" | "strategic";
109
+ export interface ResourceDescriptor {
110
+ /**
111
+ * The name of the kubernetes resource
112
+ */
113
+ name: string;
114
+ /**
115
+ * The namespace that the resource lives in (if the resource is namespaced)
116
+ *
117
+ * Note: if not provided and the resource kind is namespaced, then this defaults to `"default"`
118
+ */
119
+ namespace?: string;
120
+ }
121
+ export interface DeleteResourceDescriptor extends ResourceDescriptor {
122
+ /**
123
+ * This determinines how child resources should be handled by kubernetes
124
+ *
125
+ * @default "Background"
126
+ */
127
+ propagationPolicy?: PropagationPolicy;
128
+ }
109
129
  export declare class KubeApi<T extends KubeObject> {
110
130
  protected options: IKubeApiOptions<T>;
111
131
  readonly kind: string;
@@ -136,34 +156,15 @@ export declare class KubeApi<T extends KubeObject> {
136
156
  setResourceVersion(namespace: string, newVersion: string): void;
137
157
  getResourceVersion(namespace?: string): string;
138
158
  refreshResourceVersion(params?: KubeApiListOptions): Promise<T[]>;
139
- getUrl({ name, namespace }?: {
140
- name?: string;
141
- namespace?: string;
142
- }, query?: Partial<IKubeApiQueryParams>): string;
159
+ getUrl({ name, namespace }?: Partial<ResourceDescriptor>, query?: Partial<IKubeApiQueryParams>): string;
143
160
  protected normalizeQuery(query?: Partial<IKubeApiQueryParams>): Partial<IKubeApiQueryParams>;
144
161
  protected parseResponse(data: unknown, namespace?: string): T | T[] | null;
145
162
  list({ namespace, reqInit }?: KubeApiListOptions, query?: IKubeApiQueryParams): Promise<T[] | null>;
146
- get({ name, namespace }?: {
147
- name?: string;
148
- namespace?: string;
149
- }, query?: IKubeApiQueryParams): Promise<T | null>;
150
- create({ name, namespace }?: {
151
- name?: string;
152
- namespace?: string;
153
- }, data?: Partial<T>): Promise<T | null>;
154
- update({ name, namespace }?: {
155
- name?: string;
156
- namespace?: string;
157
- }, data?: Partial<T>): Promise<T | null>;
158
- patch({ name, namespace }?: {
159
- name?: string;
160
- namespace?: string;
161
- }, data?: Partial<T> | Patch, strategy?: KubeApiPatchType): Promise<T | null>;
162
- delete({ name, namespace, propagationPolicy }: {
163
- name: string;
164
- namespace?: string;
165
- propagationPolicy?: PropagationPolicy;
166
- }): Promise<KubeJsonApiData>;
163
+ get(desc: ResourceDescriptor, query?: IKubeApiQueryParams): Promise<T | null>;
164
+ create({ name, namespace }: Partial<ResourceDescriptor>, data?: Partial<T>): Promise<T | null>;
165
+ update({ name, namespace }: ResourceDescriptor, data: Partial<T>): Promise<T | null>;
166
+ patch(desc: ResourceDescriptor, data?: Partial<T> | Patch, strategy?: KubeApiPatchType): Promise<T | null>;
167
+ delete({ propagationPolicy, ...desc }: DeleteResourceDescriptor): Promise<KubeJsonApiData>;
167
168
  getWatchUrl(namespace?: string, query?: IKubeApiQueryParams): string;
168
169
  watch(opts?: KubeApiWatchOptions): () => void;
169
170
  protected modifyWatchEvent(event: IKubeWatchEvent<KubeJsonApiData>): void;