@k8slens/extensions 6.3.0-git.1354fa66a5.0 → 6.3.0-git.27fb128c05.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 (23) hide show
  1. package/dist/src/common/ipc/cluster.d.ts +0 -2
  2. package/dist/src/common/k8s/create-resource-stack.injectable.d.ts +5 -0
  3. package/dist/src/common/k8s/resource-stack.d.ts +25 -6
  4. package/dist/src/common/k8s-api/endpoints/helm-releases.api/request-update.injectable.d.ts +2 -6
  5. package/dist/src/common/kube-helpers/channels.d.ts +25 -0
  6. package/dist/src/extensions/common-api/k8s-api.d.ts +12 -1
  7. package/dist/src/extensions/extension-api.js +76 -898
  8. package/dist/src/main/electron-app/runnables/setup-ipc-main-handlers/setup-ipc-main-handlers.d.ts +1 -3
  9. package/dist/src/main/helm/exec-helm/exec-env.global-override-for-injectable.d.ts +9 -0
  10. package/dist/src/main/helm/exec-helm/exec-env.injectable.d.ts +2 -0
  11. package/dist/src/main/helm/helm-service/update-helm-release.injectable.d.ts +1 -2
  12. package/dist/src/main/kubectl/apply-all-handler.injectable.d.ts +5 -0
  13. package/dist/src/main/kubectl/delete-all-handler.injectable.d.ts +5 -0
  14. package/dist/src/main/kubectl/kubectl-apply-all.injectable.d.ts +2 -0
  15. package/dist/src/main/kubectl/kubectl-delete-all.injectable.d.ts +2 -0
  16. package/dist/src/main/resource-applier/resource-applier.d.ts +6 -5
  17. package/dist/src/main/routes/resource-applier/create-resource-route.injectable.d.ts +13 -1
  18. package/dist/src/renderer/components/dock/upgrade-chart/upgrade-chart-model.injectable.d.ts +2 -4
  19. package/dist/src/renderer/components/dock/upgrade-chart/view.d.ts +1 -1
  20. package/dist/src/renderer/ipc/index.d.ts +0 -8
  21. package/dist/src/renderer/kubectl/apply-all.injectable.d.ts +2 -0
  22. package/dist/src/renderer/kubectl/delete-all.injectable.d.ts +2 -0
  23. package/package.json +1 -1
@@ -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,9 @@
1
+ /**
2
+ * Copyright (c) OpenLens Authors. All rights reserved.
3
+ * Licensed under MIT License. See LICENSE in root directory for more information.
4
+ */
5
+ declare const _default: {
6
+ injectable: import("@ogre-tools/injectable").Injectable<import("mobx").IComputedValue<Partial<Record<string, string>>>, unknown, void>;
7
+ overridingInstantiate: import("@ogre-tools/injectable").Instantiate<import("mobx").IComputedValue<Partial<Record<string, string>>>, void>;
8
+ };
9
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const execHelmEnvInjectable: import("@ogre-tools/injectable").Injectable<import("mobx").IComputedValue<Partial<Record<string, string>>>, unknown, void>;
2
+ export default execHelmEnvInjectable;
@@ -1,8 +1,7 @@
1
1
  import type { Cluster } from "../../../common/cluster/cluster";
2
- import type { JsonObject } from "type-fest";
3
2
  export interface UpdateChartArgs {
4
3
  chart: string;
5
- values: JsonObject;
4
+ values: string;
6
5
  version: string;
7
6
  }
8
7
  declare const updateHelmReleaseInjectable: import("@ogre-tools/injectable").Injectable<(cluster: Cluster, releaseName: string, namespace: string, data: UpdateChartArgs) => Promise<{
@@ -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;
@@ -2,6 +2,7 @@ import type { IComputedValue } from "mobx";
2
2
  import type { SingleValue } from "react-select";
3
3
  import type { HelmChartVersion } from "../../+helm-charts/helm-charts/versions";
4
4
  import type { HelmRelease } from "../../../../common/k8s-api/endpoints/helm-releases.api";
5
+ import type { AsyncResult } from "../../../../common/utils/async-result";
5
6
  import type { SelectOption } from "../../select";
6
7
  export interface UpgradeChartModel {
7
8
  readonly release: HelmRelease;
@@ -16,10 +17,7 @@ export interface UpgradeChartModel {
16
17
  readonly value: IComputedValue<HelmChartVersion | undefined>;
17
18
  set: (value: SingleValue<SelectOption<HelmChartVersion>>) => void;
18
19
  };
19
- submit: () => Promise<UpgradeChartSubmitResult>;
20
- }
21
- export interface UpgradeChartSubmitResult {
22
- completedSuccessfully: boolean;
20
+ submit: () => Promise<AsyncResult<void, string>>;
23
21
  }
24
22
  declare const upgradeChartModelInjectable: import("@ogre-tools/injectable").Injectable<Promise<UpgradeChartModel>, unknown, Required<import("../dock/store").DockTabCreate>>;
25
23
  export default upgradeChartModelInjectable;
@@ -14,7 +14,7 @@ interface Dependencies {
14
14
  model: UpgradeChartModel;
15
15
  }
16
16
  export declare class NonInjectedUpgradeChart extends React.Component<UpgradeChartProps & Dependencies> {
17
- upgrade: () => Promise<JSX.Element | null>;
17
+ upgrade: () => Promise<JSX.Element>;
18
18
  render(): JSX.Element;
19
19
  }
20
20
  export declare const UpgradeChart: React.FunctionComponent<UpgradeChartProps>;
@@ -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.1354fa66a5.0",
5
+ "version": "6.3.0-git.27fb128c05.0",
6
6
  "copyright": "© 2022 OpenLens Authors",
7
7
  "license": "MIT",
8
8
  "main": "dist/src/extensions/extension-api.js",