@k8slens/extensions 6.2.0-git.487079b61f.0 → 6.2.0-git.5ae60e218c.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 (76) hide show
  1. package/dist/src/common/app-event-bus/app-event-bus.injectable.d.ts +3 -1
  2. package/dist/src/common/app-event-bus/emit-event.injectable.d.ts +4 -2
  3. package/dist/src/common/app-event-bus/event-bus.d.ts +3 -2
  4. package/dist/src/common/cluster-store/cluster-store.d.ts +3 -1
  5. package/dist/src/common/event-emitter.d.ts +1 -1
  6. package/dist/src/common/fs/exec-file.injectable.d.ts +2 -3
  7. package/dist/src/common/helm/add-helm-repository-channel.d.ts +1 -1
  8. package/dist/src/common/helm/remove-helm-repository-channel.d.ts +1 -1
  9. package/dist/src/common/runnable/run-many-for.d.ts +4 -0
  10. package/dist/src/common/runnable/run-many-sync-for.d.ts +11 -3
  11. package/dist/src/common/user-store/user-store.d.ts +2 -0
  12. package/dist/src/common/utils/async-result.d.ts +5 -2
  13. package/dist/src/common/utils/channel/listening-on-message-channels.injectable.d.ts +1 -5
  14. package/dist/src/common/utils/get-startable-stoppable.d.ts +7 -7
  15. package/dist/src/extensions/common-api/event-bus.d.ts +1 -1
  16. package/dist/src/extensions/extension-api.js +96 -52
  17. package/dist/src/extensions/lens-renderer-extension.d.ts +2 -0
  18. package/dist/src/features/application-menu/main/application-menu-reactivity.injectable.d.ts +1 -5
  19. package/dist/src/features/application-menu/main/stop-application-menu.injectable.d.ts +1 -1
  20. package/dist/src/features/application-update/child-features/periodical-checking-of-updates/main/periodical-check-for-updates.global-override-for-injectable.d.ts +2 -10
  21. package/dist/src/features/application-update/child-features/periodical-checking-of-updates/main/periodical-check-for-updates.injectable.d.ts +1 -5
  22. package/dist/src/features/application-update/child-features/periodical-checking-of-updates/main/stop-checking-for-updates.injectable.d.ts +1 -1
  23. package/dist/src/features/application-update/main/watch-if-update-should-happen-on-quit/stop-watching-if-update-should-happen-on-quit.injectable.d.ts +1 -1
  24. package/dist/src/features/application-update/main/watch-if-update-should-happen-on-quit/watch-if-update-should-happen-on-quit.injectable.d.ts +1 -5
  25. package/dist/src/features/cluster/legacy-extension-adding-cluster-frame-components.test.d.ts +1 -0
  26. package/dist/src/main/app-paths/setup-app-paths.injectable.d.ts +1 -1
  27. package/dist/src/main/catalog-sync-to-renderer/catalog-sync-to-renderer.injectable.d.ts +1 -5
  28. package/dist/src/main/catalog-sync-to-renderer/stop-catalog-sync.injectable.d.ts +1 -1
  29. package/dist/src/main/electron-app/features/sync-theme-from-operating-system.injectable.d.ts +1 -5
  30. package/dist/src/main/electron-app/runnables/clean-up-deep-linking.injectable.d.ts +1 -1
  31. package/dist/src/main/electron-app/runnables/dock-visibility/hide-dock-for-last-closed-window.injectable.d.ts +1 -1
  32. package/dist/src/main/electron-app/runnables/enforce-single-application-instance.injectable.d.ts +1 -1
  33. package/dist/src/main/electron-app/runnables/setup-application-name.injectable.d.ts +1 -1
  34. package/dist/src/main/electron-app/runnables/setup-ipc-main-handlers/setup-ipc-main-handlers.d.ts +5 -1
  35. package/dist/src/main/electron-app/runnables/setup-runnables-after-window-is-opened.injectable.d.ts +1 -1
  36. package/dist/src/main/electron-app/runnables/setup-runnables-before-closing-of-application.injectable.d.ts +1 -1
  37. package/dist/src/main/helm/exec-helm/exec-helm.injectable.d.ts +5 -1
  38. package/dist/src/main/helm/repositories/add-helm-repository/add-helm-repository-channel-listener.injectable.d.ts +1 -1
  39. package/dist/src/main/helm/repositories/add-helm-repository/add-helm-repository.injectable.d.ts +1 -2
  40. package/dist/src/main/helm/repositories/remove-helm-repository/remove-helm-repository-channel-listener.injectable.d.ts +1 -1
  41. package/dist/src/main/helm/repositories/remove-helm-repository/remove-helm-repository.injectable.d.ts +2 -1
  42. package/dist/src/main/lens-proxy/lens-proxy.d.ts +4 -0
  43. package/dist/src/main/resource-applier/create-resource-applier.injectable.d.ts +5 -0
  44. package/dist/src/main/{resource-applier.d.ts → resource-applier/resource-applier.d.ts} +19 -4
  45. package/dist/src/main/shell-session/shell-session.d.ts +4 -0
  46. package/dist/src/main/start-main-application/runnables/clean-up-shell-sessions.injectable.d.ts +1 -1
  47. package/dist/src/main/start-main-application/runnables/emit-close-to-event-bus.injectable.d.ts +1 -1
  48. package/dist/src/main/start-main-application/runnables/flag-renderer/flag-renderer-as-not-loaded.injectable.d.ts +1 -1
  49. package/dist/src/main/start-main-application/runnables/kube-config-sync/stop-kube-config-sync.injectable.d.ts +1 -1
  50. package/dist/src/main/start-main-application/runnables/sentry/setup.injectable.d.ts +1 -1
  51. package/dist/src/main/start-main-application/runnables/setup-hardware-acceleration.injectable.d.ts +1 -1
  52. package/dist/src/main/start-main-application/runnables/setup-immer.injectable.d.ts +1 -1
  53. package/dist/src/main/start-main-application/runnables/setup-mobx.injectable.d.ts +1 -1
  54. package/dist/src/main/start-main-application/runnables/setup-proxy-env.injectable.d.ts +1 -1
  55. package/dist/src/main/start-main-application/runnables/stop-cluster-manager.injectable.d.ts +1 -1
  56. package/dist/src/main/theme/broadcast-theme-change/broadcast-theme-change.injectable.d.ts +1 -5
  57. package/dist/src/main/theme/broadcast-theme-change/stop-broadcasting-theme-change.injectable.d.ts +1 -1
  58. package/dist/src/main/theme/sync-theme-from-os/stop-syncing-theme-from-operating-system.injectable.d.ts +1 -1
  59. package/dist/src/main/tray/electron-tray/stop-tray.injectable.d.ts +2 -2
  60. package/dist/src/main/tray/menu-icon/reactive.injectable.d.ts +1 -5
  61. package/dist/src/main/tray/menu-icon/stop-reactivity.injectable.d.ts +1 -1
  62. package/dist/src/main/tray/reactive-tray-menu-items/reactive-tray-menu-items.injectable.d.ts +1 -5
  63. package/dist/src/main/tray/reactive-tray-menu-items/stop-reactive-tray-menu-items.injectable.d.ts +1 -1
  64. package/dist/src/main/utils/channel/channel-listeners/listening-on-request-channels.injectable.d.ts +1 -5
  65. package/dist/src/main/utils/channel/channel-listeners/start-listening-on-channels.injectable.d.ts +1 -1
  66. package/dist/src/main/utils/shell-env/compute-unix-shell-environment.injectable.d.ts +3 -2
  67. package/dist/src/{common/__tests__/event-bus.test.d.ts → main/utils/shell-env/compute-unix-shell-environment.test.d.ts} +0 -0
  68. package/dist/src/main/utils/shell-env/env.injectable.d.ts +3 -0
  69. package/dist/src/main/utils/shell-env/execPath.injectable.d.ts +2 -0
  70. package/dist/src/renderer/frames/cluster-frame/cluster-frame-component-registrator.injectable.d.ts +3 -0
  71. package/dist/src/renderer/frames/cluster-frame/cluster-frame.d.ts +2 -1
  72. package/dist/src/renderer/frames/cluster-frame/init-cluster-frame/init-cluster-frame.d.ts +3 -3
  73. package/dist/src/renderer/utils/jsonPath.d.ts +3 -1
  74. package/package.json +1 -1
  75. package/dist/src/common/app-event-bus/app-event-bus.global-override-for-injectable.d.ts +0 -5
  76. package/dist/src/common/runnable/throw-with-incorrect-hierarchy-for.d.ts +0 -7
@@ -24,10 +24,12 @@ import type { LensRendererExtensionDependencies } from "./lens-extension-set-dep
24
24
  import type { KubeObjectHandlerRegistration } from "../renderer/kube-object/handler";
25
25
  import type { AppPreferenceTabRegistration } from "../features/preferences/renderer/compliance-for-legacy-extension-api/app-preference-tab-registration";
26
26
  import type { KubeObjectDetailRegistration } from "../renderer/components/kube-object-details/kube-object-detail-registration";
27
+ import type { ClusterFrameChildComponent } from "../renderer/frames/cluster-frame/cluster-frame-child-component-injection-token";
27
28
  export declare class LensRendererExtension extends LensExtension<LensRendererExtensionDependencies> {
28
29
  globalPages: registries.PageRegistration[];
29
30
  clusterPages: registries.PageRegistration[];
30
31
  clusterPageMenus: registries.ClusterPageMenuRegistration[];
32
+ clusterFrameComponents: ClusterFrameChildComponent[];
31
33
  kubeObjectStatusTexts: KubeObjectStatusRegistration[];
32
34
  appPreferences: AppPreferenceRegistration[];
33
35
  appPreferenceTabs: AppPreferenceTabRegistration[];
@@ -1,6 +1,2 @@
1
- declare const applicationMenuReactivityInjectable: import("@ogre-tools/injectable").Injectable<{
2
- readonly started: boolean;
3
- start: () => Promise<void>;
4
- stop: () => Promise<void>;
5
- }, unknown, void>;
1
+ declare const applicationMenuReactivityInjectable: import("@ogre-tools/injectable").Injectable<import("../../../common/utils/get-startable-stoppable").StartableStoppable, unknown, void>;
6
2
  export default applicationMenuReactivityInjectable;
@@ -1,5 +1,5 @@
1
1
  declare const stopApplicationMenuInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => Promise<void>;
3
+ run: () => undefined;
4
4
  }, import("../../../common/runnable/run-many-sync-for").RunnableSync<void>, void>;
5
5
  export default stopApplicationMenuInjectable;
@@ -3,15 +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<{
7
- readonly started: boolean;
8
- start: () => Promise<void>;
9
- stop: () => Promise<void>;
10
- }, unknown, void>;
11
- overridingInstantiate: import("@ogre-tools/injectable").Instantiate<{
12
- readonly started: boolean;
13
- start: () => Promise<void>;
14
- stop: () => Promise<void>;
15
- }, void>;
6
+ injectable: import("@ogre-tools/injectable").Injectable<import("../../../../../common/utils/get-startable-stoppable").StartableStoppable, unknown, void>;
7
+ overridingInstantiate: import("@ogre-tools/injectable").Instantiate<import("../../../../../common/utils/get-startable-stoppable").StartableStoppable, void>;
16
8
  };
17
9
  export default _default;
@@ -1,6 +1,2 @@
1
- declare const periodicalCheckForUpdatesInjectable: import("@ogre-tools/injectable").Injectable<{
2
- readonly started: boolean;
3
- start: () => Promise<void>;
4
- stop: () => Promise<void>;
5
- }, unknown, void>;
1
+ declare const periodicalCheckForUpdatesInjectable: import("@ogre-tools/injectable").Injectable<import("../../../../../common/utils/get-startable-stoppable").StartableStoppable, unknown, void>;
6
2
  export default periodicalCheckForUpdatesInjectable;
@@ -1,5 +1,5 @@
1
1
  declare const stopCheckingForUpdatesInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => Promise<void>;
3
+ run: () => undefined;
4
4
  }, import("../../../../../common/runnable/run-many-sync-for").RunnableSync<void>, void>;
5
5
  export default stopCheckingForUpdatesInjectable;
@@ -1,5 +1,5 @@
1
1
  declare const stopWatchingIfUpdateShouldHappenOnQuitInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => void;
3
+ run: () => undefined;
4
4
  }, import("../../../../common/runnable/run-many-sync-for").RunnableSync<void>, void>;
5
5
  export default stopWatchingIfUpdateShouldHappenOnQuitInjectable;
@@ -1,6 +1,2 @@
1
- declare const watchIfUpdateShouldHappenOnQuitInjectable: import("@ogre-tools/injectable").Injectable<{
2
- readonly started: boolean;
3
- start: () => Promise<void>;
4
- stop: () => Promise<void>;
5
- }, unknown, void>;
1
+ declare const watchIfUpdateShouldHappenOnQuitInjectable: import("@ogre-tools/injectable").Injectable<import("../../../../common/utils/get-startable-stoppable").StartableStoppable, unknown, void>;
6
2
  export default watchIfUpdateShouldHappenOnQuitInjectable;
@@ -1,5 +1,5 @@
1
1
  declare const setupAppPathsInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => void;
3
+ run: () => undefined;
4
4
  }, import("../../common/runnable/run-many-sync-for").RunnableSync<void>, void>;
5
5
  export default setupAppPathsInjectable;
@@ -1,6 +1,2 @@
1
- declare const catalogSyncToRendererInjectable: import("@ogre-tools/injectable").Injectable<{
2
- readonly started: boolean;
3
- start: () => Promise<void>;
4
- stop: () => Promise<void>;
5
- }, unknown, void>;
1
+ declare const catalogSyncToRendererInjectable: import("@ogre-tools/injectable").Injectable<import("../../common/utils/get-startable-stoppable").StartableStoppable, unknown, void>;
6
2
  export default catalogSyncToRendererInjectable;
@@ -1,5 +1,5 @@
1
1
  declare const stopCatalogSyncInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => Promise<void>;
3
+ run: () => undefined;
4
4
  }, import("../../common/runnable/run-many-sync-for").RunnableSync<void>, void>;
5
5
  export default stopCatalogSyncInjectable;
@@ -1,6 +1,2 @@
1
- declare const syncThemeFromOperatingSystemInjectable: import("@ogre-tools/injectable").Injectable<{
2
- readonly started: boolean;
3
- start: () => Promise<void>;
4
- stop: () => Promise<void>;
5
- }, unknown, void>;
1
+ declare const syncThemeFromOperatingSystemInjectable: import("@ogre-tools/injectable").Injectable<import("../../../common/utils/get-startable-stoppable").StartableStoppable, unknown, void>;
6
2
  export default syncThemeFromOperatingSystemInjectable;
@@ -1,5 +1,5 @@
1
1
  declare const cleanUpDeepLinkingInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => void;
3
+ run: () => undefined;
4
4
  }, import("../../../common/runnable/run-many-sync-for").RunnableSync<void>, void>;
5
5
  export default cleanUpDeepLinkingInjectable;
@@ -1,5 +1,5 @@
1
1
  declare const hideDockForLastClosedWindowInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => void;
3
+ run: () => undefined;
4
4
  }, import("../../../../common/runnable/run-many-sync-for").RunnableSync<void>, void>;
5
5
  export default hideDockForLastClosedWindowInjectable;
@@ -1,5 +1,5 @@
1
1
  declare const enforceSingleApplicationInstanceInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => void;
3
+ run: () => undefined;
4
4
  }, import("../../../common/runnable/run-many-sync-for").RunnableSync<void>, void>;
5
5
  export default enforceSingleApplicationInstanceInjectable;
@@ -1,5 +1,5 @@
1
1
  declare const setupApplicationNameInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => void;
3
+ run: () => undefined;
4
4
  }, import("../../../common/runnable/run-many-sync-for").RunnableSync<void>, void>;
5
5
  export default setupApplicationNameInjectable;
@@ -7,6 +7,8 @@ import type { AskUserForFilePaths } from "../../../ipc/ask-user-for-file-paths.i
7
7
  import type { ApplicationMenuItemTypes } from "../../../../features/application-menu/main/menu-items/application-menu-item-injection-token";
8
8
  import type { Composite } from "../../../../common/utils/composite/get-composite/get-composite";
9
9
  import type { MenuItemRoot } from "../../../../features/application-menu/main/application-menu-item-composite.injectable";
10
+ import type { EmitAppEvent } from "../../../../common/app-event-bus/emit-event.injectable";
11
+ import type { CreateResourceApplier } from "../../../resource-applier/create-resource-applier.injectable";
10
12
  interface Dependencies {
11
13
  applicationMenuItemComposite: IComputedValue<Composite<ApplicationMenuItemTypes | MenuItemRoot>>;
12
14
  clusterManager: ClusterManager;
@@ -14,6 +16,8 @@ interface Dependencies {
14
16
  clusterStore: ClusterStore;
15
17
  operatingSystemTheme: IComputedValue<Theme>;
16
18
  askUserForFilePaths: AskUserForFilePaths;
19
+ emitAppEvent: EmitAppEvent;
20
+ createResourceApplier: CreateResourceApplier;
17
21
  }
18
- export declare const setupIpcMainHandlers: ({ applicationMenuItemComposite, clusterManager, catalogEntityRegistry, clusterStore, operatingSystemTheme, askUserForFilePaths, }: Dependencies) => void;
22
+ export declare const setupIpcMainHandlers: ({ applicationMenuItemComposite, clusterManager, catalogEntityRegistry, clusterStore, operatingSystemTheme, askUserForFilePaths, emitAppEvent, createResourceApplier, }: Dependencies) => void;
19
23
  export {};
@@ -1,5 +1,5 @@
1
1
  declare const setupRunnablesAfterWindowIsOpenedInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => void;
3
+ run: () => undefined;
4
4
  }, import("../../../common/runnable/run-many-sync-for").RunnableSync<void>, void>;
5
5
  export default setupRunnablesAfterWindowIsOpenedInjectable;
@@ -1,5 +1,5 @@
1
1
  declare const setupRunnablesBeforeClosingOfApplicationInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => void;
3
+ run: () => undefined;
4
4
  }, import("../../../common/runnable/run-many-sync-for").RunnableSync<void>, void>;
5
5
  export default setupRunnablesBeforeClosingOfApplicationInjectable;
@@ -1,4 +1,8 @@
1
+ /// <reference types="node" />
2
+ import type { ExecFileException } from "child_process";
1
3
  import type { AsyncResult } from "../../../common/utils/async-result";
2
- export declare type ExecHelm = (args: string[]) => Promise<AsyncResult<string, string>>;
4
+ export declare type ExecHelm = (args: string[]) => Promise<AsyncResult<string, ExecFileException & {
5
+ stderr: string;
6
+ }>>;
3
7
  declare const execHelmInjectable: import("@ogre-tools/injectable").Injectable<ExecHelm, unknown, void>;
4
8
  export default execHelmInjectable;
@@ -1,5 +1,5 @@
1
1
  declare const addHelmRepositoryChannelListenerInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  channel: import("../../../../common/helm/add-helm-repository-channel").AddHelmRepositoryChannel;
3
- handler: (req: import("../../../../common/helm/helm-repo").HelmRepo) => import("../../../../common/utils/async-result").AsyncResult<string, string> | Promise<import("../../../../common/utils/async-result").AsyncResult<string, string>>;
3
+ handler: (req: import("../../../../common/helm/helm-repo").HelmRepo) => import("../../../../common/utils/async-result").AsyncResult<void, string> | Promise<import("../../../../common/utils/async-result").AsyncResult<void, string>>;
4
4
  }, import("../../../utils/channel/channel-listeners/listener-tokens").RequestChannelListener<import("../../../../common/utils/channel/request-channel-listener-injection-token").RequestChannel<unknown, unknown>>, void>;
5
5
  export default addHelmRepositoryChannelListenerInjectable;
@@ -1,3 +1,2 @@
1
- import type { HelmRepo } from "../../../../common/helm/helm-repo";
2
- declare const addHelmRepositoryInjectable: import("@ogre-tools/injectable").Injectable<(repo: HelmRepo) => Promise<import("../../../../common/utils/async-result").AsyncResult<string, string>>, unknown, void>;
1
+ declare const addHelmRepositoryInjectable: import("@ogre-tools/injectable").Injectable<(req: import("../../../../common/helm/helm-repo").HelmRepo) => import("../../../../common/utils/async-result").AsyncResult<void, string> | Promise<import("../../../../common/utils/async-result").AsyncResult<void, string>>, unknown, void>;
3
2
  export default addHelmRepositoryInjectable;
@@ -1,5 +1,5 @@
1
1
  declare const removeHelmRepositoryChannelListenerInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  channel: import("../../../../common/helm/remove-helm-repository-channel").RemoveHelmRepositoryChannel;
3
- handler: (req: import("../../../../common/helm/helm-repo").HelmRepo) => import("../../../../common/utils/async-result").AsyncResult<string, string> | Promise<import("../../../../common/utils/async-result").AsyncResult<string, string>>;
3
+ handler: (req: import("../../../../common/helm/helm-repo").HelmRepo) => import("../../../../common/utils/async-result").AsyncResult<void, string> | Promise<import("../../../../common/utils/async-result").AsyncResult<void, string>>;
4
4
  }, import("../../../utils/channel/channel-listeners/listener-tokens").RequestChannelListener<import("../../../../common/utils/channel/request-channel-listener-injection-token").RequestChannel<unknown, unknown>>, void>;
5
5
  export default removeHelmRepositoryChannelListenerInjectable;
@@ -1,3 +1,4 @@
1
1
  import type { HelmRepo } from "../../../../common/helm/helm-repo";
2
- declare const removeHelmRepositoryInjectable: import("@ogre-tools/injectable").Injectable<(repo: HelmRepo) => Promise<import("../../../../common/utils/async-result").AsyncResult<string, string>>, unknown, void>;
2
+ import type { AsyncResult } from "../../../../common/utils/async-result";
3
+ declare const removeHelmRepositoryInjectable: import("@ogre-tools/injectable").Injectable<(repo: HelmRepo) => Promise<AsyncResult<void, string>>, unknown, void>;
3
4
  export default removeHelmRepositoryInjectable;
@@ -10,18 +10,22 @@ import type { ClusterContextHandler } from "../context-handler/context-handler";
10
10
  import type { Cluster } from "../../common/cluster/cluster";
11
11
  import type { ProxyApiRequestArgs } from "./proxy-functions";
12
12
  import type { SetRequired } from "type-fest";
13
+ import type { EmitAppEvent } from "../../common/app-event-bus/emit-event.injectable";
14
+ import type { Logger } from "../../common/logger";
13
15
  declare type GetClusterForRequest = (req: http.IncomingMessage) => Cluster | undefined;
14
16
  export declare type ServerIncomingMessage = SetRequired<http.IncomingMessage, "url" | "method">;
15
17
  interface Dependencies {
16
18
  getClusterForRequest: GetClusterForRequest;
17
19
  shellApiRequest: (args: ProxyApiRequestArgs) => void | Promise<void>;
18
20
  kubeApiUpgradeRequest: (args: ProxyApiRequestArgs) => void | Promise<void>;
21
+ emitAppEvent: EmitAppEvent;
19
22
  readonly router: Router;
20
23
  readonly proxy: httpProxy;
21
24
  readonly lensProxyPort: {
22
25
  set: (portNumber: number) => void;
23
26
  };
24
27
  readonly contentSecurityPolicy: string;
28
+ readonly logger: Logger;
25
29
  }
26
30
  export declare function isLongRunningRequest(reqUrl: string): boolean;
27
31
  export declare class LensProxy {
@@ -0,0 +1,5 @@
1
+ import type { Cluster } from "../../common/cluster/cluster";
2
+ import { ResourceApplier } from "./resource-applier";
3
+ export declare type CreateResourceApplier = (cluster: Cluster) => ResourceApplier;
4
+ declare const createResourceApplierInjectable: import("@ogre-tools/injectable").Injectable<CreateResourceApplier, unknown, void>;
5
+ export default createResourceApplierInjectable;
@@ -2,11 +2,26 @@
2
2
  * Copyright (c) OpenLens Authors. All rights reserved.
3
3
  * Licensed under MIT License. See LICENSE in root directory for more information.
4
4
  */
5
- import type { Cluster } from "../common/cluster/cluster";
5
+ import type { Cluster } from "../../common/cluster/cluster";
6
6
  import type { Patch } from "rfc6902";
7
+ import type { EmitAppEvent } from "../../common/app-event-bus/emit-event.injectable";
8
+ import type { Logger } from "../../common/logger";
9
+ import type { WriteFile } from "../../common/fs/write-file.injectable";
10
+ import type { DeleteFile } from "../../common/fs/delete-file.injectable";
11
+ import type { ExecFile } from "../../common/fs/exec-file.injectable";
12
+ import type { JoinPaths } from "../../common/path/join-paths.injectable";
13
+ export interface ResourceApplierDependencies {
14
+ emitAppEvent: EmitAppEvent;
15
+ writeFile: WriteFile;
16
+ deleteFile: DeleteFile;
17
+ execFile: ExecFile;
18
+ joinPaths: JoinPaths;
19
+ readonly logger: Logger;
20
+ }
7
21
  export declare class ResourceApplier {
8
- protected cluster: Cluster;
9
- constructor(cluster: Cluster);
22
+ protected readonly dependencies: ResourceApplierDependencies;
23
+ protected readonly cluster: Cluster;
24
+ constructor(dependencies: ResourceApplierDependencies, cluster: Cluster);
10
25
  /**
11
26
  * Patch a kube resource's manifest, throwing any error that occurs.
12
27
  * @param name The name of the kube resource
@@ -19,6 +34,6 @@ export declare class ResourceApplier {
19
34
  protected kubectlApply(content: string): Promise<string>;
20
35
  kubectlApplyAll(resources: string[], extraArgs?: string[]): Promise<string>;
21
36
  kubectlDeleteAll(resources: string[], extraArgs?: string[]): Promise<string>;
22
- protected kubectlCmdAll(subCmd: string, resources: string[], args?: string[]): Promise<string>;
37
+ protected kubectlCmdAll(subCmd: string, resources: string[], parentArgs?: string[]): Promise<string>;
23
38
  protected sanitizeObject(resource: string): string;
24
39
  }
@@ -11,6 +11,8 @@ import type { Logger } from "../../common/logger";
11
11
  import type { ComputeShellEnvironment } from "../utils/shell-env/compute-shell-environment.injectable";
12
12
  import type { SpawnPty } from "./spawn-pty.injectable";
13
13
  import type { InitializableState } from "../../common/initializable-state/create";
14
+ import type { EmitAppEvent } from "../../common/app-event-bus/emit-event.injectable";
15
+ import type { Stat } from "../../common/fs/stat/stat.injectable";
14
16
  export declare class ShellOpenError extends Error {
15
17
  constructor(message: string, options?: ErrorOptions);
16
18
  }
@@ -98,6 +100,8 @@ export interface ShellSessionDependencies {
98
100
  readonly buildVersion: InitializableState<string>;
99
101
  computeShellEnvironment: ComputeShellEnvironment;
100
102
  spawnPty: SpawnPty;
103
+ emitAppEvent: EmitAppEvent;
104
+ stat: Stat;
101
105
  }
102
106
  export interface ShellSessionArgs {
103
107
  kubectl: Kubectl;
@@ -1,5 +1,5 @@
1
1
  declare const cleanUpShellSessionsInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => void;
3
+ run: () => undefined;
4
4
  }, import("../../../common/runnable/run-many-sync-for").RunnableSync<void>, void>;
5
5
  export default cleanUpShellSessionsInjectable;
@@ -1,5 +1,5 @@
1
1
  declare const emitCloseToEventBusInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => void;
3
+ run: () => undefined;
4
4
  }, import("../../../common/runnable/run-many-sync-for").RunnableSync<void>, void>;
5
5
  export default emitCloseToEventBusInjectable;
@@ -1,5 +1,5 @@
1
1
  declare const flagRendererAsNotLoadedInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => void;
3
+ run: () => undefined;
4
4
  }, import("../../../../common/runnable/run-many-sync-for").RunnableSync<void>, void>;
5
5
  export default flagRendererAsNotLoadedInjectable;
@@ -1,5 +1,5 @@
1
1
  declare const stopKubeConfigSyncInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => void;
3
+ run: () => undefined;
4
4
  }, import("../../../../common/runnable/run-many-sync-for").RunnableSync<void>, void>;
5
5
  export default stopKubeConfigSyncInjectable;
@@ -1,5 +1,5 @@
1
1
  declare const setupSentryInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => void;
3
+ run: () => undefined;
4
4
  }, import("../../../../common/runnable/run-many-sync-for").RunnableSync<void>, void>;
5
5
  export default setupSentryInjectable;
@@ -1,5 +1,5 @@
1
1
  declare const setupHardwareAccelerationInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => void;
3
+ run: () => undefined;
4
4
  }, import("../../../common/runnable/run-many-sync-for").RunnableSync<void>, void>;
5
5
  export default setupHardwareAccelerationInjectable;
@@ -1,5 +1,5 @@
1
1
  declare const setupImmerInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => void;
3
+ run: () => undefined;
4
4
  }, import("../../../common/runnable/run-many-sync-for").RunnableSync<void>, void>;
5
5
  export default setupImmerInjectable;
@@ -1,5 +1,5 @@
1
1
  declare const setupMobxInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => void;
3
+ run: () => undefined;
4
4
  }, import("../../../common/runnable/run-many-sync-for").RunnableSync<void>, void>;
5
5
  export default setupMobxInjectable;
@@ -1,5 +1,5 @@
1
1
  declare const setupProxyEnvInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => void;
3
+ run: () => undefined;
4
4
  }, import("../../../common/runnable/run-many-sync-for").RunnableSync<void>, void>;
5
5
  export default setupProxyEnvInjectable;
@@ -1,5 +1,5 @@
1
1
  declare const stopClusterManagerInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => void;
3
+ run: () => undefined;
4
4
  }, import("../../../common/runnable/run-many-sync-for").RunnableSync<void>, void>;
5
5
  export default stopClusterManagerInjectable;
@@ -1,6 +1,2 @@
1
- declare const broadcastThemeChangeInjectable: import("@ogre-tools/injectable").Injectable<{
2
- readonly started: boolean;
3
- start: () => Promise<void>;
4
- stop: () => Promise<void>;
5
- }, unknown, void>;
1
+ declare const broadcastThemeChangeInjectable: import("@ogre-tools/injectable").Injectable<import("../../../common/utils/get-startable-stoppable").StartableStoppable, unknown, void>;
6
2
  export default broadcastThemeChangeInjectable;
@@ -1,5 +1,5 @@
1
1
  declare const stopBroadcastingThemeChangeInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => Promise<void>;
3
+ run: () => undefined;
4
4
  }, import("../../../common/runnable/run-many-sync-for").RunnableSync<void>, void>;
5
5
  export default stopBroadcastingThemeChangeInjectable;
@@ -1,5 +1,5 @@
1
1
  declare const stopSyncingThemeFromOperatingSystemInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => Promise<void>;
3
+ run: () => undefined;
4
4
  }, import("../../../common/runnable/run-many-sync-for").RunnableSync<void>, void>;
5
5
  export default stopSyncingThemeFromOperatingSystemInjectable;
@@ -1,9 +1,9 @@
1
1
  declare const stopTrayInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => void;
3
+ run: () => undefined;
4
4
  runAfter: {
5
5
  id: string;
6
- run: () => Promise<void>;
6
+ run: () => undefined;
7
7
  };
8
8
  }, import("../../../common/runnable/run-many-sync-for").RunnableSync<void>, void>;
9
9
  export default stopTrayInjectable;
@@ -1,6 +1,2 @@
1
- declare const reactiveTrayMenuIconInjectable: import("@ogre-tools/injectable").Injectable<{
2
- readonly started: boolean;
3
- start: () => Promise<void>;
4
- stop: () => Promise<void>;
5
- }, unknown, void>;
1
+ declare const reactiveTrayMenuIconInjectable: import("@ogre-tools/injectable").Injectable<import("../../../common/utils/get-startable-stoppable").StartableStoppable, unknown, void>;
6
2
  export default reactiveTrayMenuIconInjectable;
@@ -1,5 +1,5 @@
1
1
  declare const stopReactiveTrayMenuIconInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => Promise<void>;
3
+ run: () => undefined;
4
4
  }, import("../../../common/runnable/run-many-sync-for").RunnableSync<void>, void>;
5
5
  export default stopReactiveTrayMenuIconInjectable;
@@ -1,6 +1,2 @@
1
- declare const reactiveTrayMenuItemsInjectable: import("@ogre-tools/injectable").Injectable<{
2
- readonly started: boolean;
3
- start: () => Promise<void>;
4
- stop: () => Promise<void>;
5
- }, unknown, void>;
1
+ declare const reactiveTrayMenuItemsInjectable: import("@ogre-tools/injectable").Injectable<import("../../../common/utils/get-startable-stoppable").StartableStoppable, unknown, void>;
6
2
  export default reactiveTrayMenuItemsInjectable;
@@ -1,5 +1,5 @@
1
1
  declare const stopReactiveTrayMenuItemsInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => Promise<void>;
3
+ run: () => undefined;
4
4
  }, import("../../../common/runnable/run-many-sync-for").RunnableSync<void>, void>;
5
5
  export default stopReactiveTrayMenuItemsInjectable;
@@ -1,6 +1,2 @@
1
- declare const listeningOnRequestChannelsInjectable: import("@ogre-tools/injectable").Injectable<{
2
- readonly started: boolean;
3
- start: () => Promise<void>;
4
- stop: () => Promise<void>;
5
- }, unknown, void>;
1
+ declare const listeningOnRequestChannelsInjectable: import("@ogre-tools/injectable").Injectable<import("../../../../common/utils/get-startable-stoppable").StartableStoppable, unknown, void>;
6
2
  export default listeningOnRequestChannelsInjectable;
@@ -1,5 +1,5 @@
1
1
  declare const startListeningOnChannelsInjectable: import("@ogre-tools/injectable").Injectable<{
2
2
  id: string;
3
- run: () => Promise<void>;
3
+ run: () => void;
4
4
  }, import("../../../../common/runnable/run-many-for").Runnable<void>, void>;
5
5
  export default startListeningOnChannelsInjectable;
@@ -3,9 +3,10 @@
3
3
  * Licensed under MIT License. See LICENSE in root directory for more information.
4
4
  */
5
5
  import type { EnvironmentVariables } from "./compute-shell-environment.injectable";
6
+ import type { AsyncResult } from "../../../common/utils/async-result";
6
7
  export interface UnixShellEnvOptions {
7
- signal?: AbortSignal;
8
+ signal: AbortSignal;
8
9
  }
9
- export declare type ComputeUnixShellEnvironment = (shell: string, opts?: UnixShellEnvOptions) => Promise<EnvironmentVariables>;
10
+ export declare type ComputeUnixShellEnvironment = (shell: string, opts: UnixShellEnvOptions) => Promise<AsyncResult<EnvironmentVariables, string>>;
10
11
  declare const computeUnixShellEnvironmentInjectable: import("@ogre-tools/injectable").Injectable<ComputeUnixShellEnvironment, unknown, void>;
11
12
  export default computeUnixShellEnvironmentInjectable;
@@ -0,0 +1,3 @@
1
+ /// <reference types="node" />
2
+ declare const processEnvInjectable: import("@ogre-tools/injectable").Injectable<NodeJS.ProcessEnv, unknown, void>;
3
+ export default processEnvInjectable;
@@ -0,0 +1,2 @@
1
+ declare const processExecPathInjectable: import("@ogre-tools/injectable").Injectable<string, unknown, void>;
2
+ export default processExecPathInjectable;
@@ -0,0 +1,3 @@
1
+ import type { ExtensionRegistrator } from "../../../extensions/extension-loader/extension-registrator-injection-token";
2
+ declare const clusterFrameComponentRegistratorInjectable: import("@ogre-tools/injectable").Injectable<ExtensionRegistrator, ExtensionRegistrator, void>;
3
+ export default clusterFrameComponentRegistratorInjectable;
@@ -6,10 +6,11 @@ import React from "react";
6
6
  import type { NamespaceStore } from "../../components/+namespaces/store";
7
7
  import type { SubscribeStores } from "../../kube-watch-api/kube-watch-api";
8
8
  import type { ClusterFrameChildComponent } from "./cluster-frame-child-component-injection-token";
9
+ import type { IComputedValue } from "mobx";
9
10
  interface Dependencies {
10
11
  namespaceStore: NamespaceStore;
11
12
  subscribeStores: SubscribeStores;
12
- childComponents: ClusterFrameChildComponent[];
13
+ childComponents: IComputedValue<ClusterFrameChildComponent[]>;
13
14
  watchHistoryState: () => () => void;
14
15
  }
15
16
  export declare const NonInjectedClusterFrame: ({ namespaceStore, subscribeStores, childComponents, watchHistoryState, }: Dependencies) => JSX.Element;
@@ -4,16 +4,16 @@
4
4
  */
5
5
  import type { Cluster } from "../../../../common/cluster/cluster";
6
6
  import type { CatalogEntityRegistry } from "../../../api/catalog/entity/registry";
7
- import type { AppEvent } from "../../../../common/app-event-bus/event-bus";
8
7
  import type { CatalogEntity } from "../../../../common/catalog";
9
8
  import type { ClusterFrameContext } from "../../../cluster-frame-context/cluster-frame-context";
9
+ import type { EmitAppEvent } from "../../../../common/app-event-bus/emit-event.injectable";
10
10
  interface Dependencies {
11
11
  hostedCluster: Cluster;
12
12
  loadExtensions: (getCluster: () => CatalogEntity) => void;
13
13
  catalogEntityRegistry: CatalogEntityRegistry;
14
14
  frameRoutingId: number;
15
- emitEvent: (event: AppEvent) => void;
15
+ emitAppEvent: EmitAppEvent;
16
16
  clusterFrameContext: ClusterFrameContext;
17
17
  }
18
- export declare const initClusterFrame: ({ hostedCluster, loadExtensions, catalogEntityRegistry, frameRoutingId, emitEvent, clusterFrameContext, }: Dependencies) => (unmountRoot: () => void) => Promise<void>;
18
+ export declare const initClusterFrame: ({ hostedCluster, loadExtensions, catalogEntityRegistry, frameRoutingId, emitAppEvent, clusterFrameContext, }: Dependencies) => (unmountRoot: () => void) => Promise<void>;
19
19
  export {};
@@ -9,6 +9,7 @@
9
9
  *
10
10
  * Known shorthands:
11
11
  * - Leading `$` is optional (but implied)
12
+ * - The string `/` can be used without a leading `\` escapement
12
13
  * - The string `\.` is used to denote the "value of '.'" and not "next key"
13
14
  * - The string `-` can be used while not in quotes
14
15
  * - `[]` as shorthand for `[0]`
@@ -16,9 +17,10 @@
16
17
  * - Allow `...foo` as well as `..foo`
17
18
  */
18
19
  export declare function convertKubectlJsonPathToNodeJsonPath(jsonPath: string): string;
20
+ export declare function formatJSONValue(value: unknown): string;
19
21
  /**
20
22
  * This function is a safer version of `JSONPath.value(obj, path)` with untrusted jsonpath strings
21
23
  *
22
24
  * This function will also stringify the value retreived from the object
23
25
  */
24
- export declare function safeJSONPathValue(obj: object, path: string): string;
26
+ export declare function safeJSONPathValue(obj: object, path: string): unknown;
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.2.0-git.487079b61f.0",
5
+ "version": "6.2.0-git.5ae60e218c.0",
6
6
  "copyright": "© 2022 OpenLens Authors",
7
7
  "license": "MIT",
8
8
  "main": "dist/src/extensions/extension-api.js",