@k8slens/extensions 6.3.0-git.95cee3bcc8.0 → 6.3.0-git.aedc47551a.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.
@@ -7,7 +7,6 @@ import type { ApplicationMenuItemTypes } from "../../../../features/application-
7
7
  import type { Composite } from "../../../../common/utils/composite/get-composite/get-composite";
8
8
  import type { MenuItemRoot } from "../../../../features/application-menu/main/application-menu-item-composite.injectable";
9
9
  import type { EmitAppEvent } from "../../../../common/app-event-bus/emit-event.injectable";
10
- import type { CreateResourceApplier } from "../../../resource-applier/create-resource-applier.injectable";
11
10
  interface Dependencies {
12
11
  applicationMenuItemComposite: IComputedValue<Composite<ApplicationMenuItemTypes | MenuItemRoot>>;
13
12
  catalogEntityRegistry: CatalogEntityRegistry;
@@ -15,7 +14,6 @@ interface Dependencies {
15
14
  operatingSystemTheme: IComputedValue<Theme>;
16
15
  askUserForFilePaths: AskUserForFilePaths;
17
16
  emitAppEvent: EmitAppEvent;
18
- createResourceApplier: CreateResourceApplier;
19
17
  }
20
- export declare const setupIpcMainHandlers: ({ applicationMenuItemComposite, catalogEntityRegistry, clusterStore, operatingSystemTheme, askUserForFilePaths, emitAppEvent, createResourceApplier, }: Dependencies) => void;
18
+ export declare const setupIpcMainHandlers: ({ applicationMenuItemComposite, catalogEntityRegistry, clusterStore, operatingSystemTheme, askUserForFilePaths, emitAppEvent, }: Dependencies) => void;
21
19
  export {};
@@ -0,0 +1,5 @@
1
+ declare const kubectlApplyAllChannelHandlerInjectable: import("@ogre-tools/injectable").Injectable<{
2
+ channel: import("../../common/utils/channel/request-channel-listener-injection-token").RequestChannel<import("../../common/kube-helpers/channels").KubectlApplyAllArgs, import("../../common/utils/async-result").AsyncResult<string, string>>;
3
+ handler: (req: import("../../common/kube-helpers/channels").KubectlApplyAllArgs) => import("../../common/utils/async-result").AsyncResult<string, string> | Promise<import("../../common/utils/async-result").AsyncResult<string, string>>;
4
+ }, import("../utils/channel/channel-listeners/listener-tokens").RequestChannelListener<import("../../common/utils/channel/request-channel-listener-injection-token").RequestChannel<unknown, unknown>>, void>;
5
+ export default kubectlApplyAllChannelHandlerInjectable;
@@ -0,0 +1,5 @@
1
+ declare const kubectlDeleteAllChannelHandlerInjectable: import("@ogre-tools/injectable").Injectable<{
2
+ channel: import("../../common/utils/channel/request-channel-listener-injection-token").RequestChannel<import("../../common/kube-helpers/channels").KubectlDeleteAllArgs, import("../../common/utils/async-result").AsyncResult<string, string>>;
3
+ handler: (req: import("../../common/kube-helpers/channels").KubectlDeleteAllArgs) => import("../../common/utils/async-result").AsyncResult<string, string> | Promise<import("../../common/utils/async-result").AsyncResult<string, string>>;
4
+ }, import("../utils/channel/channel-listeners/listener-tokens").RequestChannelListener<import("../../common/utils/channel/request-channel-listener-injection-token").RequestChannel<unknown, unknown>>, void>;
5
+ export default kubectlDeleteAllChannelHandlerInjectable;
@@ -0,0 +1,2 @@
1
+ declare const kubectlApplyAllInjectable: import("@ogre-tools/injectable").Injectable<(req: import("../../common/kube-helpers/channels").KubectlApplyAllArgs) => Promise<import("../../common/utils/async-result").AsyncResult<string, string>>, (req: import("../../common/kube-helpers/channels").KubectlApplyAllArgs) => Promise<import("../../common/utils/async-result").AsyncResult<string, string>>, void>;
2
+ export default kubectlApplyAllInjectable;
@@ -0,0 +1,2 @@
1
+ declare const kubectlDeleteAllInjectable: import("@ogre-tools/injectable").Injectable<(req: import("../../common/kube-helpers/channels").KubectlDeleteAllArgs) => Promise<import("../../common/utils/async-result").AsyncResult<string, string>>, (req: import("../../common/kube-helpers/channels").KubectlDeleteAllArgs) => Promise<import("../../common/utils/async-result").AsyncResult<string, string>>, void>;
2
+ export default kubectlDeleteAllInjectable;
@@ -10,6 +10,7 @@ import type { WriteFile } from "../../common/fs/write-file.injectable";
10
10
  import type { DeleteFile } from "../../common/fs/delete-file.injectable";
11
11
  import type { ExecFile } from "../../common/fs/exec-file.injectable";
12
12
  import type { JoinPaths } from "../../common/path/join-paths.injectable";
13
+ import type { AsyncResult } from "../../common/utils/async-result";
13
14
  export interface ResourceApplierDependencies {
14
15
  emitAppEvent: EmitAppEvent;
15
16
  writeFile: WriteFile;
@@ -30,10 +31,10 @@ export declare class ResourceApplier {
30
31
  * @param ns The optional namespace of the kube resource
31
32
  */
32
33
  patch(name: string, kind: string, patch: Patch, ns?: string): Promise<string>;
33
- create(resource: string): Promise<string>;
34
- protected kubectlApply(content: string): Promise<string>;
35
- kubectlApplyAll(resources: string[], extraArgs?: string[]): Promise<string>;
36
- kubectlDeleteAll(resources: string[], extraArgs?: string[]): Promise<string>;
37
- protected kubectlCmdAll(subCmd: string, resources: string[], parentArgs?: string[]): Promise<string>;
34
+ create(resource: string): Promise<AsyncResult<string, string>>;
35
+ protected kubectlApply(content: string): Promise<AsyncResult<string, string>>;
36
+ kubectlApplyAll(resources: string[], extraArgs?: string[]): Promise<AsyncResult<string, string>>;
37
+ kubectlDeleteAll(resources: string[], extraArgs?: string[]): Promise<AsyncResult<string, string>>;
38
+ protected kubectlCmdAll(subCmd: string, resources: string[], parentArgs?: string[]): Promise<AsyncResult<string, string>>;
38
39
  protected sanitizeObject(resource: string): string;
39
40
  }
@@ -1,2 +1,14 @@
1
- declare const createResourceRouteInjectable: import("@ogre-tools/injectable").Injectable<import("../../router/route").Route<string, "/api/stack">, import("../../router/route").Route<string, "/api/stack">, void>;
1
+ declare const createResourceRouteInjectable: import("@ogre-tools/injectable").Injectable<import("../../router/route").Route<{
2
+ callWasSuccessful: true;
3
+ response: string;
4
+ } | {
5
+ callWasSuccessful: false;
6
+ error: string;
7
+ }, "/api/stack">, import("../../router/route").Route<{
8
+ callWasSuccessful: true;
9
+ response: string;
10
+ } | {
11
+ callWasSuccessful: false;
12
+ error: string;
13
+ }, "/api/stack">, void>;
2
14
  export default createResourceRouteInjectable;
@@ -22,14 +22,6 @@ export declare function requestInitialClusterStates(): Promise<{
22
22
  id: string;
23
23
  state: ClusterState;
24
24
  }[]>;
25
- export declare function requestKubectlApplyAll(clusterId: ClusterId, resources: string[], kubectlArgs: string[]): Promise<{
26
- stderr?: string;
27
- stdout?: string;
28
- }>;
29
- export declare function requestKubectlDeleteAll(clusterId: ClusterId, resources: string[], kubectlArgs: string[]): Promise<{
30
- stderr?: string;
31
- stdout?: string;
32
- }>;
33
25
  export declare function requestInitialExtensionDiscovery(): Promise<{
34
26
  isLoaded: boolean;
35
27
  }>;
@@ -0,0 +1,2 @@
1
+ declare const kubectlApplyAllInjectable: import("@ogre-tools/injectable").Injectable<(req: import("../../common/kube-helpers/channels").KubectlApplyAllArgs) => Promise<import("../../common/utils/async-result").AsyncResult<string, string>>, (req: import("../../common/kube-helpers/channels").KubectlApplyAllArgs) => Promise<import("../../common/utils/async-result").AsyncResult<string, string>>, void>;
2
+ export default kubectlApplyAllInjectable;
@@ -0,0 +1,2 @@
1
+ declare const kubectlDeleteAllInjectable: import("@ogre-tools/injectable").Injectable<(req: import("../../common/kube-helpers/channels").KubectlDeleteAllArgs) => Promise<import("../../common/utils/async-result").AsyncResult<string, string>>, (req: import("../../common/kube-helpers/channels").KubectlDeleteAllArgs) => Promise<import("../../common/utils/async-result").AsyncResult<string, string>>, void>;
2
+ export default kubectlDeleteAllInjectable;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@k8slens/extensions",
3
3
  "productName": "OpenLens extensions",
4
4
  "description": "OpenLens - Open Source Kubernetes IDE: extensions",
5
- "version": "6.3.0-git.95cee3bcc8.0",
5
+ "version": "6.3.0-git.aedc47551a.0",
6
6
  "copyright": "© 2022 OpenLens Authors",
7
7
  "license": "MIT",
8
8
  "main": "dist/src/extensions/extension-api.js",