@k8slens/extensions 6.2.0-git.077c49f97d.0 → 6.2.0-git.18f73d8a39.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 (21) hide show
  1. package/dist/src/common/fetch/download-json.injectable.d.ts +1 -2
  2. package/dist/src/common/fetch/fetch.global-override-for-injectable.d.ts +2 -2
  3. package/dist/src/common/fetch/fetch.injectable.d.ts +3 -1
  4. package/dist/src/common/k8s-api/__tests__/kube-api-version-detection.test.d.ts +1 -0
  5. package/dist/src/common/k8s-api/endpoints/cron-job.api.d.ts +1 -1
  6. package/dist/src/common/k8s-api/kube-api-parse.d.ts +1 -0
  7. package/dist/src/common/k8s-api/kube-api.d.ts +16 -4
  8. package/dist/src/common/utils/abort-controller.d.ts +1 -0
  9. package/dist/src/extensions/extension-api.js +180 -39
  10. package/dist/src/features/preferences/common/preferences-route-for-legacy-extensions.injectable.d.ts +6 -0
  11. package/dist/src/features/preferences/renderer/preferences-route-component-for-legacy-extensions.injectable.d.ts +13 -0
  12. package/dist/src/features/preferences/urls-of-legacy-extensions.test.d.ts +1 -0
  13. package/dist/src/main/routes/files/development.injectable.d.ts +4 -0
  14. package/dist/src/main/routes/files/production.injectable.d.ts +12 -0
  15. package/dist/src/main/routes/files/static-file-route.injectable.d.ts +3 -0
  16. package/dist/src/renderer/components/+workloads-cronjobs/cron-jobs-route-component.injectable.d.ts +1 -2
  17. package/dist/src/renderer/components/+workloads-cronjobs/cronjobs.d.ts +1 -3
  18. package/dist/src/renderer/utils/jsonPath.d.ts +3 -1
  19. package/package.json +1 -1
  20. package/dist/src/main/routes/static-file-route.injectable.d.ts +0 -3
  21. package/dist/src/renderer/components/+workloads-cronjobs/legacy-store.d.ts +0 -8
@@ -1,8 +1,7 @@
1
- import type { JsonValue } from "type-fest";
2
1
  import type { AsyncResult } from "../utils/async-result";
3
2
  export interface DownloadJsonOptions {
4
3
  signal?: AbortSignal | null | undefined;
5
4
  }
6
- export declare type DownloadJson = (url: string, opts?: DownloadJsonOptions) => Promise<AsyncResult<JsonValue, string>>;
5
+ export declare type DownloadJson = (url: string, opts?: DownloadJsonOptions) => Promise<AsyncResult<unknown, string>>;
7
6
  declare const downloadJsonInjectable: import("@ogre-tools/injectable").Injectable<DownloadJson, unknown, void>;
8
7
  export default downloadJsonInjectable;
@@ -3,7 +3,7 @@
3
3
  * Licensed under MIT License. See LICENSE in root directory for more information.
4
4
  */
5
5
  declare const _default: {
6
- injectable: import("@ogre-tools/injectable").Injectable<import("./fetch.injectable").Fetch, unknown, void>;
7
- overridingInstantiate: import("@ogre-tools/injectable").Instantiate<import("./fetch.injectable").Fetch, void>;
6
+ injectable: import("@ogre-tools/injectable").Injectable<Function, any, any>;
7
+ overridingInstantiate: import("@ogre-tools/injectable").Instantiate<Function, any>;
8
8
  };
9
9
  export default _default;
@@ -1,4 +1,6 @@
1
- import type { RequestInit, Response } from "node-fetch";
1
+ import type * as FetchModule from "node-fetch";
2
+ declare type Response = FetchModule.Response;
3
+ declare type RequestInit = FetchModule.RequestInit;
2
4
  export declare type Fetch = (url: string, init?: RequestInit) => Promise<Response>;
3
5
  declare const fetchInjectable: import("@ogre-tools/injectable").Injectable<Fetch, unknown, void>;
4
6
  export default fetchInjectable;
@@ -35,7 +35,7 @@ export interface CronJobStatus {
35
35
  export declare class CronJob extends KubeObject<NamespaceScopedMetadata, CronJobStatus, CronJobSpec> {
36
36
  static readonly kind = "CronJob";
37
37
  static readonly namespaced = true;
38
- static readonly apiBase = "/apis/batch/v1beta1/cronjobs";
38
+ static readonly apiBase = "/apis/batch/v1/cronjobs";
39
39
  getSuspendFlag(): string;
40
40
  getLastScheduleTime(): string;
41
41
  getSchedule(): string;
@@ -11,6 +11,7 @@ export interface IKubeApiLinkRef {
11
11
  }
12
12
  export interface IKubeApiParsed extends IKubeApiLinkRef {
13
13
  apiBase: string;
14
+ apiPrefix: string;
14
15
  apiGroup: string;
15
16
  apiVersionWithGroup: string;
16
17
  }
@@ -10,6 +10,7 @@ import type { Disposer } from "../utils";
10
10
  import type { RequestInit, Response } from "node-fetch";
11
11
  import type { Patch } from "rfc6902";
12
12
  import type { PartialDeep } from "type-fest";
13
+ import type { Logger } from "../logger";
13
14
  import type AbortController from "abort-controller";
14
15
  /**
15
16
  * The options used for creating a `KubeApi`
@@ -114,6 +115,17 @@ export interface KubeApiResourceList {
114
115
  kind?: string;
115
116
  resources: KubeApiResource[];
116
117
  }
118
+ export interface KubeApiResourceVersion {
119
+ groupVersion: string;
120
+ version: string;
121
+ }
122
+ export interface KubeApiResourceVersionList {
123
+ apiVersion: string;
124
+ kind: string;
125
+ name: string;
126
+ preferredVersion: KubeApiResourceVersion;
127
+ versions: KubeApiResourceVersion[];
128
+ }
117
129
  export declare type PropagationPolicy = undefined | "Orphan" | "Foreground" | "Background";
118
130
  export declare type KubeApiWatchCallback<T extends KubeJsonApiData = KubeJsonApiData> = (data: IKubeWatchEvent<T> | null, error: KubeStatus | Response | null | any) => void;
119
131
  export interface KubeApiWatchOptions<Object extends KubeObject, Data extends KubeJsonApiDataFor<Object>> {
@@ -163,6 +175,9 @@ export interface DeleteResourceDescriptor extends ResourceDescriptor {
163
175
  */
164
176
  propagationPolicy?: PropagationPolicy;
165
177
  }
178
+ export interface KubeApiDependencies {
179
+ readonly logger: Logger;
180
+ }
166
181
  export declare class KubeApi<Object extends KubeObject = KubeObject, Data extends KubeJsonApiDataFor<Object> = KubeJsonApiDataFor<Object>> {
167
182
  readonly kind: string;
168
183
  readonly apiVersion: string;
@@ -180,6 +195,7 @@ export declare class KubeApi<Object extends KubeObject = KubeObject, Data extend
180
195
  protected readonly doCheckPreferredVersion: boolean;
181
196
  protected readonly fullApiPathname: string;
182
197
  protected readonly fallbackApiBases: string[] | undefined;
198
+ protected readonly dependencies: KubeApiDependencies;
183
199
  constructor(opts: KubeApiOptions<Object, Data>);
184
200
  get apiVersionWithGroup(): string;
185
201
  /**
@@ -187,10 +203,6 @@ export declare class KubeApi<Object extends KubeObject = KubeObject, Data extend
187
203
  * First tries fullApiPathname, then urls in order from fallbackApiBases.
188
204
  */
189
205
  private getLatestApiPrefixGroup;
190
- /**
191
- * Get the apiPrefix and apiGroup to be used for fetching the preferred version.
192
- */
193
- private getPreferredVersionPrefixGroup;
194
206
  protected checkPreferredVersion(): Promise<void>;
195
207
  setResourceVersion(namespace: string | undefined, newVersion: string): void;
196
208
  getResourceVersion(namespace?: string): string | undefined;
@@ -10,3 +10,4 @@ import AbortController from "abort-controller";
10
10
  export declare class WrappedAbortController extends AbortController {
11
11
  constructor(parent?: AbortController | undefined);
12
12
  }
13
+ export declare function setTimeoutFor(controller: AbortController, timeout: number): void;