@k8slens/extensions 5.3.1-git.a6763391ee.0 → 5.3.1-git.a711499bb6.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 (152) hide show
  1. package/dist/src/common/cluster-types.d.ts +5 -1
  2. package/dist/src/{extensions/registries/menu-registry.d.ts → common/ipc/catalog.d.ts} +9 -6
  3. package/dist/src/common/ipc/update-available.ipc.d.ts +2 -0
  4. package/dist/src/common/k8s-api/cluster-context.d.ts +1 -0
  5. package/dist/src/common/k8s-api/endpoints/daemon-set.api.d.ts +2 -5
  6. package/dist/src/common/k8s-api/endpoints/deployment.api.d.ts +2 -5
  7. package/dist/src/common/k8s-api/endpoints/job.api.d.ts +2 -5
  8. package/dist/src/common/k8s-api/endpoints/metrics.api.d.ts +2 -0
  9. package/dist/src/common/k8s-api/endpoints/network-policy.api.d.ts +72 -32
  10. package/dist/src/common/k8s-api/endpoints/nodes.api.d.ts +6 -6
  11. package/dist/src/common/k8s-api/endpoints/persistent-volume-claims.api.d.ts +3 -16
  12. package/dist/src/common/k8s-api/endpoints/poddisruptionbudget.api.d.ts +2 -6
  13. package/dist/src/common/k8s-api/endpoints/pods.api.d.ts +2 -0
  14. package/dist/src/common/k8s-api/endpoints/replica-set.api.d.ts +2 -5
  15. package/dist/src/common/k8s-api/endpoints/stateful-set.api.d.ts +2 -5
  16. package/dist/src/common/k8s-api/kube-api-parse.d.ts +2 -2
  17. package/dist/src/common/k8s-api/kube-api.d.ts +58 -30
  18. package/dist/src/common/k8s-api/kube-json-api.d.ts +1 -2
  19. package/dist/src/common/k8s-api/kube-object.d.ts +25 -2
  20. package/dist/src/common/k8s-api/kube-object.store.d.ts +11 -7
  21. package/dist/src/common/k8s-api/kube-watch-api.d.ts +7 -30
  22. package/dist/src/common/protocol-handler/error.d.ts +3 -3
  23. package/dist/src/common/protocol-handler/router.d.ts +13 -7
  24. package/dist/src/common/utils/readableStream.d.ts +2 -2
  25. package/dist/src/extensions/extension-api.js +825 -2183
  26. package/dist/src/extensions/extension-compatibility.d.ts +3 -1
  27. package/dist/src/extensions/extension-discovery.d.ts +3 -1
  28. package/dist/src/extensions/{extension-loader.d.ts → extension-loader/extension-loader.d.ts} +7 -5
  29. package/dist/src/extensions/extension-loader/extension-loader.injectable.d.ts +24 -0
  30. package/dist/src/{main/initializers/registries.d.ts → extensions/extension-loader/index.d.ts} +1 -1
  31. package/dist/src/extensions/extensions.injectable.d.ts +28 -0
  32. package/dist/src/{renderer/utils/copyToClipboard.d.ts → extensions/getDiForUnitTesting.d.ts} +2 -7
  33. package/dist/src/extensions/lens-extension.d.ts +2 -1
  34. package/dist/src/extensions/lens-main-extension.d.ts +1 -1
  35. package/dist/src/extensions/lens-renderer-extension.d.ts +6 -3
  36. package/dist/src/extensions/registries/index.d.ts +0 -1
  37. package/dist/src/extensions/registries/status-bar-registry.d.ts +6 -0
  38. package/dist/src/extensions/renderer-api/k8s-api.d.ts +1 -0
  39. package/dist/src/main/catalog-pusher.d.ts +1 -1
  40. package/dist/src/main/cluster-manager.d.ts +1 -1
  41. package/dist/src/main/cluster.d.ts +3 -7
  42. package/dist/src/main/context-handler.d.ts +8 -1
  43. package/dist/src/main/getDi.d.ts +22 -0
  44. package/dist/src/main/getDiForUnitTesting.d.ts +22 -0
  45. package/dist/src/main/initializers/index.d.ts +0 -1
  46. package/dist/src/main/initializers/ipc.d.ts +3 -1
  47. package/dist/src/main/kube-auth-proxy.d.ts +5 -7
  48. package/dist/src/main/kubeconfig-manager.d.ts +16 -4
  49. package/dist/src/main/lens-proxy.d.ts +8 -1
  50. package/dist/src/main/menu/electron-menu-items.injectable.d.ts +28 -0
  51. package/dist/src/main/menu/electron-menu-items.test.d.ts +1 -0
  52. package/dist/src/main/menu/menu.d.ts +33 -0
  53. package/dist/src/main/protocol-handler/index.d.ts +1 -1
  54. package/dist/src/main/protocol-handler/{router.d.ts → lens-protocol-router-main/lens-protocol-router-main.d.ts} +13 -8
  55. package/dist/src/main/protocol-handler/lens-protocol-router-main/lens-protocol-router-main.injectable.d.ts +25 -0
  56. package/dist/src/main/window-manager.d.ts +3 -0
  57. package/dist/src/renderer/api/terminal-api.d.ts +0 -2
  58. package/dist/src/renderer/bootstrap.d.ts +5 -2
  59. package/dist/src/renderer/cluster-frame.d.ts +2 -1
  60. package/dist/src/renderer/components/+events/kube-event-details.d.ts +1 -1
  61. package/dist/src/renderer/components/{clipboard/clipboard.d.ts → +extensions/attempt-install/attempt-install.d.ts} +10 -16
  62. package/dist/src/{main/menu.d.ts → renderer/components/+extensions/attempt-install/attempt-install.injectable.d.ts} +6 -6
  63. package/dist/src/renderer/components/+extensions/attempt-install/create-temp-files-and-validate/create-temp-files-and-validate.d.ts +11 -0
  64. package/dist/src/renderer/components/+extensions/attempt-install/get-extension-dest-folder/get-extension-dest-folder.d.ts +1 -0
  65. package/dist/src/renderer/components/+extensions/attempt-install/unpack-extension/unpack-extension.d.ts +27 -0
  66. package/dist/src/renderer/components/+extensions/attempt-install/unpack-extension/unpack-extension.injectable.d.ts +26 -0
  67. package/dist/src/renderer/components/+extensions/attempt-install/validate-package/validate-package.d.ts +22 -0
  68. package/dist/src/renderer/components/+extensions/attempt-install-by-info/attempt-install-by-info.d.ts +11 -0
  69. package/dist/src/renderer/components/+extensions/attempt-install-by-info/attempt-install-by-info.injectable.d.ts +24 -0
  70. package/dist/src/renderer/components/+extensions/attempt-installs/attempt-installs.d.ts +5 -0
  71. package/dist/src/renderer/components/+extensions/attempt-installs/attempt-installs.injectable.d.ts +24 -0
  72. package/dist/src/renderer/components/+extensions/confirm-uninstall-extension/confirm-uninstall-extension.d.ts +6 -0
  73. package/dist/src/renderer/components/+extensions/confirm-uninstall-extension/confirm-uninstall-extension.injectable.d.ts +25 -0
  74. package/dist/src/renderer/components/+extensions/disable-extension/disable-extension.d.ts +26 -0
  75. package/dist/src/renderer/components/+extensions/disable-extension/disable-extension.injectable.d.ts +25 -0
  76. package/dist/src/renderer/components/+extensions/enable-extension/enable-extension.d.ts +26 -0
  77. package/dist/src/renderer/components/+extensions/enable-extension/enable-extension.injectable.d.ts +25 -0
  78. package/dist/src/renderer/components/+extensions/extensions.d.ts +1 -15
  79. package/dist/src/renderer/components/+extensions/get-message-from-error/get-message-from-error.d.ts +21 -0
  80. package/dist/src/renderer/components/+extensions/install-from-input/install-from-input.d.ts +28 -0
  81. package/dist/src/renderer/components/+extensions/install-from-input/install-from-input.injectable.d.ts +24 -0
  82. package/dist/src/renderer/components/+extensions/install-from-select-file-dialog/install-from-select-file-dialog.d.ts +4 -0
  83. package/dist/src/renderer/components/+extensions/install-from-select-file-dialog/install-from-select-file-dialog.injectable.d.ts +24 -0
  84. package/dist/src/renderer/components/+extensions/install-on-drop/install-on-drop.d.ts +4 -0
  85. package/dist/src/renderer/components/+extensions/install-on-drop/install-on-drop.injectable.d.ts +24 -0
  86. package/dist/src/renderer/components/+extensions/read-file-notify/read-file-notify.d.ts +2 -0
  87. package/dist/src/renderer/{protocol-handler/app-handlers.d.ts → components/+extensions/supported-extension-formats.d.ts} +1 -1
  88. package/dist/src/renderer/components/+extensions/uninstall-extension/uninstall-extension.d.ts +26 -0
  89. package/dist/src/renderer/components/+extensions/uninstall-extension/uninstall-extension.injectable.d.ts +25 -0
  90. package/dist/src/renderer/components/+extensions/user-extensions/user-extensions.injectable.d.ts +28 -0
  91. package/dist/src/renderer/components/+namespaces/namespace-details.d.ts +0 -1
  92. package/dist/src/renderer/components/+namespaces/namespace-select.d.ts +0 -1
  93. package/dist/src/renderer/components/+namespaces/namespace.store.d.ts +1 -1
  94. package/dist/src/renderer/components/+network-ingresses/ingress-details.d.ts +1 -1
  95. package/dist/src/renderer/components/+network-policies/__tests__/network-policy-details.test.d.ts +21 -0
  96. package/dist/src/renderer/components/+network-policies/network-policy-details.d.ts +8 -4
  97. package/dist/src/renderer/components/+nodes/node-details.d.ts +1 -2
  98. package/dist/src/renderer/components/+nodes/nodes.d.ts +2 -1
  99. package/dist/src/renderer/components/+preferences/extension-settings.d.ts +7 -0
  100. package/dist/src/renderer/components/+preferences/preferences.d.ts +0 -2
  101. package/dist/src/renderer/components/+storage-classes/storage-class-details.d.ts +1 -1
  102. package/dist/src/renderer/components/+storage-volume-claims/volume-claim-details.d.ts +1 -1
  103. package/dist/src/renderer/components/+workloads-cronjobs/cronjob-details.d.ts +1 -1
  104. package/dist/src/renderer/components/+workloads-daemonsets/daemonset-details.d.ts +0 -1
  105. package/dist/src/renderer/components/+workloads-deployments/deployment-details.d.ts +0 -1
  106. package/dist/src/renderer/components/+workloads-jobs/job-details.d.ts +1 -1
  107. package/dist/src/renderer/components/+workloads-overview/overview-workload-status.d.ts +2 -7
  108. package/dist/src/renderer/components/+workloads-overview/overview.d.ts +2 -0
  109. package/dist/src/renderer/components/+workloads-replicasets/replicaset-details.d.ts +1 -2
  110. package/dist/src/renderer/components/+workloads-statefulsets/statefulset-details.d.ts +0 -1
  111. package/dist/src/renderer/components/avatar/__tests__/avatar.test.d.ts +21 -0
  112. package/dist/src/renderer/components/avatar/avatar.d.ts +7 -8
  113. package/dist/src/renderer/components/{clipboard → avatar}/index.d.ts +1 -1
  114. package/dist/src/renderer/components/cluster-manager/active-hotbar-name.d.ts +21 -0
  115. package/dist/src/renderer/components/cluster-manager/bottom-bar.d.ts +0 -1
  116. package/dist/src/renderer/components/context.d.ts +8 -1
  117. package/dist/src/renderer/components/dialog/dialog.d.ts +1 -0
  118. package/dist/src/renderer/components/dock/install-chart.d.ts +0 -1
  119. package/dist/src/renderer/components/drawer/drawer.d.ts +14 -3
  120. package/dist/src/renderer/components/getDi.d.ts +22 -0
  121. package/dist/src/renderer/components/getDiForUnitTesting.d.ts +22 -0
  122. package/dist/src/renderer/components/hotbar/hotbar-entity-icon.d.ts +3 -3
  123. package/dist/src/renderer/components/hotbar/hotbar-icon.d.ts +3 -10
  124. package/dist/src/renderer/components/hotbar/hotbar-menu.d.ts +3 -0
  125. package/dist/src/renderer/components/kube-object-list-layout/kube-object-list-layout.d.ts +2 -0
  126. package/dist/src/renderer/components/kube-object-menu/dependencies/api-manager.injectable.d.ts +24 -0
  127. package/dist/src/renderer/components/kube-object-menu/dependencies/cluster-name.injectable.d.ts +27 -0
  128. package/dist/src/renderer/components/kube-object-menu/dependencies/cluster.injectable.d.ts +4 -0
  129. package/dist/src/renderer/components/kube-object-menu/dependencies/edit-resource-tab.injectable.d.ts +24 -0
  130. package/dist/src/renderer/components/kube-object-menu/dependencies/hide-details.injectable.d.ts +24 -0
  131. package/dist/src/renderer/components/kube-object-menu/dependencies/kube-object-menu-items/get-kube-object-menu-items.d.ts +29 -0
  132. package/dist/src/renderer/components/kube-object-menu/dependencies/kube-object-menu-items/kube-object-menu-items.injectable.d.ts +24 -0
  133. package/dist/src/renderer/components/kube-object-menu/dependencies/kube-object-menu-items/kube-object-menu-registry.injectable.d.ts +24 -0
  134. package/dist/src/renderer/components/kube-object-menu/index.d.ts +2 -1
  135. package/dist/src/renderer/components/kube-object-menu/kube-object-menu.d.ts +4 -13
  136. package/dist/src/renderer/components/kube-object-menu/kube-object-menu.test.d.ts +21 -0
  137. package/dist/src/renderer/components/kubeconfig-dialog/kubeconfig-dialog.d.ts +0 -1
  138. package/dist/src/renderer/components/layout/__tests__/topbar-win-linux.test.d.ts +21 -0
  139. package/dist/src/renderer/components/resizing-anchor/resizing-anchor.d.ts +3 -1
  140. package/dist/src/renderer/components/test-utils/renderFor.d.ts +27 -0
  141. package/dist/src/renderer/initializers/index.d.ts +1 -0
  142. package/dist/src/renderer/initializers/ipc.d.ts +2 -1
  143. package/dist/src/renderer/initializers/status-bar-registry.d.ts +21 -0
  144. package/dist/src/renderer/port-forward/port-forward.store.d.ts +1 -1
  145. package/dist/src/renderer/protocol-handler/bind-protocol-add-route-handlers/bind-protocol-add-route-handlers.d.ts +27 -0
  146. package/dist/src/renderer/protocol-handler/bind-protocol-add-route-handlers/bind-protocol-add-route-handlers.injectable.d.ts +24 -0
  147. package/dist/src/renderer/protocol-handler/index.d.ts +2 -2
  148. package/dist/src/renderer/protocol-handler/{router.d.ts → lens-protocol-router-renderer/lens-protocol-router-renderer.d.ts} +7 -1
  149. package/dist/src/renderer/protocol-handler/lens-protocol-router-renderer/lens-protocol-router-renderer.injectable.d.ts +25 -0
  150. package/dist/src/renderer/root-frame.d.ts +3 -1
  151. package/dist/src/renderer/utils/index.d.ts +0 -1
  152. package/package.json +1 -1
@@ -18,6 +18,8 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
+ import { SemVer } from "semver";
21
22
  import type { LensExtensionManifest } from "./lens-extension";
22
- export declare function isCompatibleExtension(manifest: LensExtensionManifest): boolean;
23
+ export declare function rawIsCompatibleExtension(version: SemVer): (manifest: LensExtensionManifest) => boolean;
24
+ export declare const isCompatibleExtension: (manifest: LensExtensionManifest) => boolean;
23
25
  export declare function isCompatibleBundledExtension(manifest: LensExtensionManifest): boolean;
@@ -21,6 +21,7 @@
21
21
  /// <reference types="node" />
22
22
  import { EventEmitter } from "events";
23
23
  import { Singleton } from "../common/utils";
24
+ import type { ExtensionLoader } from "./extension-loader";
24
25
  import type { LensExtensionId, LensExtensionManifest } from "./lens-extension";
25
26
  export interface InstalledExtension {
26
27
  id: LensExtensionId;
@@ -49,6 +50,7 @@ interface LoadFromFolderOptions {
49
50
  * - "remove": When extension is removed. The event is of type LensExtensionId
50
51
  */
51
52
  export declare class ExtensionDiscovery extends Singleton {
53
+ protected extensionLoader: ExtensionLoader;
52
54
  protected bundledFolderPath: string;
53
55
  private loadStarted;
54
56
  private extensions;
@@ -58,7 +60,7 @@ export declare class ExtensionDiscovery extends Singleton {
58
60
  };
59
61
  protected static readonly extensionDiscoveryChannel = "extension-discovery:main";
60
62
  events: EventEmitter;
61
- constructor();
63
+ constructor(extensionLoader: ExtensionLoader);
62
64
  get localFolderPath(): string;
63
65
  get packageJsonPath(): string;
64
66
  get inTreeTargetPath(): string;
@@ -18,14 +18,15 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
- import { Disposer, Singleton } from "../common/utils";
22
- import type { InstalledExtension } from "./extension-discovery";
23
- import type { LensExtension, LensExtensionConstructor, LensExtensionId } from "./lens-extension";
21
+ import { Disposer } from "../../common/utils";
22
+ import type { KubernetesCluster } from "../common-api/catalog";
23
+ import type { InstalledExtension } from "../extension-discovery";
24
+ import type { LensExtension, LensExtensionConstructor, LensExtensionId } from "../lens-extension";
24
25
  export declare function extensionPackagesRoot(): string;
25
26
  /**
26
27
  * Loads installed extensions to the Lens application
27
28
  */
28
- export declare class ExtensionLoader extends Singleton {
29
+ export declare class ExtensionLoader {
29
30
  protected extensions: import("mobx").ObservableMap<string, InstalledExtension>;
30
31
  protected instances: import("mobx").ObservableMap<string, LensExtension>;
31
32
  /**
@@ -46,6 +47,7 @@ export declare class ExtensionLoader extends Singleton {
46
47
  cancel(): void;
47
48
  };
48
49
  constructor();
50
+ get enabledExtensionInstances(): LensExtension[];
49
51
  get userExtensions(): Map<LensExtensionId, InstalledExtension>;
50
52
  /**
51
53
  * Get the extension instance by its manifest name
@@ -75,7 +77,7 @@ export declare class ExtensionLoader extends Singleton {
75
77
  syncExtensions(extensions: [LensExtensionId, InstalledExtension][]): void;
76
78
  loadOnMain(): void;
77
79
  loadOnClusterManagerRenderer(): void;
78
- loadOnClusterRenderer(): void;
80
+ loadOnClusterRenderer(entity: KubernetesCluster): void;
79
81
  protected autoInitExtensions(register: (ext: LensExtension) => Promise<Disposer[]>): import("mobx").IReactionDisposer;
80
82
  protected requireExtension(extension: InstalledExtension): LensExtensionConstructor | null;
81
83
  getExtension(extId: LensExtensionId): InstalledExtension;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Copyright (c) 2021 OpenLens Authors
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ * this software and associated documentation files (the "Software"), to deal in
6
+ * the Software without restriction, including without limitation the rights to
7
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ * the Software, and to permit persons to whom the Software is furnished to do so,
9
+ * subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ */
21
+ import type { Injectable } from "@ogre-tools/injectable";
22
+ import { ExtensionLoader } from "./extension-loader";
23
+ declare const extensionLoaderInjectable: Injectable<ExtensionLoader>;
24
+ export default extensionLoaderInjectable;
@@ -18,4 +18,4 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
- export declare function initRegistries(): void;
21
+ export * from "./extension-loader";
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Copyright (c) 2021 OpenLens Authors
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ * this software and associated documentation files (the "Software"), to deal in
6
+ * the Software without restriction, including without limitation the rights to
7
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ * the Software, and to permit persons to whom the Software is furnished to do so,
9
+ * subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ */
21
+ import { Injectable } from "@ogre-tools/injectable";
22
+ import { IComputedValue } from "mobx";
23
+ import type { LensExtension } from "./lens-extension";
24
+ import type { ExtensionLoader } from "./extension-loader";
25
+ declare const extensionsInjectable: Injectable<IComputedValue<LensExtension[]>, {
26
+ extensionLoader: ExtensionLoader;
27
+ }>;
28
+ export default extensionsInjectable;
@@ -18,10 +18,5 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
- export declare function copyToClipboard(elem: HTMLElement, { resetSelection }?: {
22
- resetSelection?: boolean;
23
- }): {
24
- copied: boolean;
25
- copiedText: string;
26
- clearSelection: () => void;
27
- };
21
+ import { ConfigurableDependencyInjectionContainer } from "@ogre-tools/injectable";
22
+ export declare const getDiForUnitTesting: () => ConfigurableDependencyInjectionContainer;
@@ -37,7 +37,8 @@ export declare class LensExtension {
37
37
  readonly manifestPath: string;
38
38
  readonly isBundled: boolean;
39
39
  protocolHandlers: ProtocolHandlerRegistration[];
40
- private isEnabled;
40
+ private _isEnabled;
41
+ get isEnabled(): boolean;
41
42
  [Disposers]: import("../common/utils").ExtendableDisposer;
42
43
  constructor({ id, manifest, manifestPath, isBundled }: InstalledExtension);
43
44
  get name(): string;
@@ -21,7 +21,7 @@
21
21
  import { LensExtension } from "./lens-extension";
22
22
  import type { CatalogEntity } from "../common/catalog";
23
23
  import type { IObservableArray } from "mobx";
24
- import type { MenuRegistration } from "./registries";
24
+ import type { MenuRegistration } from "../main/menu/menu-registration";
25
25
  export declare class LensMainExtension extends LensExtension {
26
26
  appMenus: MenuRegistration[];
27
27
  navigate(pageId?: string, params?: Record<string, any>, frameId?: number): Promise<void>;
@@ -19,12 +19,12 @@
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
21
  import type * as registries from "./registries";
22
- import type { Cluster } from "../main/cluster";
23
22
  import { LensExtension } from "./lens-extension";
24
23
  import type { CatalogEntity } from "../common/catalog";
25
24
  import type { Disposer } from "../common/utils";
26
25
  import { EntityFilter } from "../renderer/api/catalog-entity-registry";
27
26
  import { CategoryFilter } from "../renderer/api/catalog-category-registry";
27
+ import type { KubernetesCluster } from "../common/catalog-entities";
28
28
  export declare class LensRendererExtension extends LensExtension {
29
29
  globalPages: registries.PageRegistration[];
30
30
  clusterPages: registries.PageRegistration[];
@@ -43,9 +43,12 @@ export declare class LensRendererExtension extends LensExtension {
43
43
  topBarItems: registries.TopBarRegistration[];
44
44
  navigate<P extends object>(pageId?: string, params?: P): Promise<void>;
45
45
  /**
46
- * Defines if extension is enabled for a given cluster. Defaults to `true`.
46
+ * Defines if extension is enabled for a given cluster. This method is only
47
+ * called when the extension is created within a cluster frame.
48
+ *
49
+ * The default implementation is to return `true`
47
50
  */
48
- isEnabledForCluster(cluster: Cluster): Promise<Boolean>;
51
+ isEnabledForCluster(cluster: KubernetesCluster): Promise<Boolean>;
49
52
  /**
50
53
  * Add a filtering function for the catalog entities. This will be removed if the extension is disabled.
51
54
  * @param fn The function which should return a truthy value for those entities which should be kept.
@@ -20,7 +20,6 @@
20
20
  */
21
21
  export * from "./page-registry";
22
22
  export * from "./page-menu-registry";
23
- export * from "./menu-registry";
24
23
  export * from "./app-preference-registry";
25
24
  export * from "./status-bar-registry";
26
25
  export * from "./kube-object-detail-registry";
@@ -22,6 +22,12 @@ import type React from "react";
22
22
  import { BaseRegistry } from "./base-registry";
23
23
  interface StatusBarComponents {
24
24
  Item?: React.ComponentType;
25
+ /**
26
+ * The side of the bottom bar to place this component.
27
+ *
28
+ * @default "right"
29
+ */
30
+ position?: "left" | "right";
25
31
  }
26
32
  interface StatusBarRegistrationV2 {
27
33
  components?: StatusBarComponents;
@@ -54,6 +54,7 @@ export { ClusterRole, clusterRoleApi } from "../../common/k8s-api/endpoints";
54
54
  export { ClusterRoleBinding, clusterRoleBindingApi } from "../../common/k8s-api/endpoints";
55
55
  export { CustomResourceDefinition, crdApi } from "../../common/k8s-api/endpoints";
56
56
  export { KubeObjectStatusLevel } from "./kube-object-status";
57
+ export { KubeJsonApi } from "../../common/k8s-api/kube-json-api";
57
58
  export type { ILocalKubeApiConfig, IRemoteKubeApiConfig, IKubeApiCluster } from "../../common/k8s-api/kube-api";
58
59
  export type { IPodContainer, IPodContainerStatus } from "../../common/k8s-api/endpoints";
59
60
  export type { ISecretRef } from "../../common/k8s-api/endpoints";
@@ -20,4 +20,4 @@
20
20
  */
21
21
  import type { CatalogEntityRegistry } from "./catalog";
22
22
  import "../common/catalog-entities/kubernetes-cluster";
23
- export declare function pushCatalogToRenderer(catalog: CatalogEntityRegistry): import("mobx").IReactionDisposer;
23
+ export declare function pushCatalogToRenderer(catalog: CatalogEntityRegistry): import("../common/utils").ExtendableDisposer;
@@ -34,7 +34,7 @@ export declare class ClusterManager extends Singleton {
34
34
  protected updateCatalog(clusters: Cluster[]): void;
35
35
  protected updateEntityFromCluster(cluster: Cluster): void;
36
36
  protected updateEntityStatus(entity: KubernetesCluster, cluster?: Cluster): void;
37
- syncClustersFromCatalog(entities: KubernetesCluster[]): void;
37
+ protected syncClustersFromCatalog(entities: KubernetesCluster[]): void;
38
38
  protected onNetworkOffline: () => void;
39
39
  protected onNetworkOnline: () => void;
40
40
  stop(): void;
@@ -40,8 +40,8 @@ export declare class Cluster implements ClusterModel, ClusterState {
40
40
  * @internal
41
41
  */
42
42
  contextHandler: ContextHandler;
43
- protected kubeconfigManager: KubeconfigManager;
44
- protected eventDisposers: Function[];
43
+ protected proxyKubeconfigManager: KubeconfigManager;
44
+ protected eventsDisposer: import("../common/utils").ExtendableDisposer;
45
45
  protected activated: boolean;
46
46
  private resourceAccessStatuses;
47
47
  get whenReady(): Promise<void> & {
@@ -198,11 +198,7 @@ export declare class Cluster implements ClusterModel, ClusterState {
198
198
  /**
199
199
  * @internal
200
200
  */
201
- recreateProxyKubeconfig(): Promise<void>;
202
- /**
203
- * internal
204
- */
205
- protected unbindEvents(): void;
201
+ protected recreateProxyKubeconfig(): Promise<void>;
206
202
  /**
207
203
  * @param force force activation
208
204
  * @internal
@@ -29,13 +29,19 @@ export interface PrometheusDetails {
29
29
  prometheusPath: string;
30
30
  provider: PrometheusProvider;
31
31
  }
32
+ interface PrometheusServicePreferences {
33
+ namespace: string;
34
+ service: string;
35
+ port: number;
36
+ prefix: string;
37
+ }
32
38
  export declare class ContextHandler {
33
39
  protected cluster: Cluster;
34
40
  clusterUrl: UrlWithStringQuery;
35
41
  protected kubeAuthProxy?: KubeAuthProxy;
36
42
  protected apiTarget?: httpProxy.ServerOptions;
37
43
  protected prometheusProvider?: string;
38
- protected prometheusPath: string | null;
44
+ protected prometheus?: PrometheusServicePreferences;
39
45
  constructor(cluster: Cluster);
40
46
  setupPrometheus(preferences?: ClusterPrometheusPreferences): void;
41
47
  getPrometheusDetails(): Promise<PrometheusDetails>;
@@ -49,3 +55,4 @@ export declare class ContextHandler {
49
55
  ensureServer(): Promise<void>;
50
56
  stopServer(): void;
51
57
  }
58
+ export {};
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Copyright (c) 2021 OpenLens Authors
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ * this software and associated documentation files (the "Software"), to deal in
6
+ * the Software without restriction, including without limitation the rights to
7
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ * the Software, and to permit persons to whom the Software is furnished to do so,
9
+ * subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ */
21
+ /// <reference types="@ogre-tools/injectable" />
22
+ export declare const getDi: () => import("@ogre-tools/injectable").ConfigurableDependencyInjectionContainer;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Copyright (c) 2021 OpenLens Authors
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ * this software and associated documentation files (the "Software"), to deal in
6
+ * the Software without restriction, including without limitation the rights to
7
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ * the Software, and to permit persons to whom the Software is furnished to do so,
9
+ * subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ */
21
+ import { ConfigurableDependencyInjectionContainer } from "@ogre-tools/injectable";
22
+ export declare const getDiForUnitTesting: () => ConfigurableDependencyInjectionContainer;
@@ -18,7 +18,6 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
- export * from "./registries";
22
21
  export * from "./metrics-providers";
23
22
  export * from "./ipc";
24
23
  export * from "./cluster-metadata-detectors";
@@ -18,4 +18,6 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
- export declare function initIpcMainHandlers(): void;
21
+ import type { MenuRegistration } from "../menu/menu-registration";
22
+ import type { IComputedValue } from "mobx";
23
+ export declare function initIpcMainHandlers(electronMenuItems: IComputedValue<MenuRegistration[]>): void;
@@ -21,18 +21,16 @@
21
21
  /// <reference types="node" />
22
22
  import { ChildProcess } from "child_process";
23
23
  import type { Cluster } from "./cluster";
24
- import { Kubectl } from "./kubectl";
25
24
  export declare class KubeAuthProxy {
25
+ protected readonly cluster: Cluster;
26
+ protected readonly env: NodeJS.ProcessEnv;
26
27
  readonly apiPrefix: string;
27
28
  get port(): number;
28
- protected _port?: number;
29
- protected cluster: Cluster;
30
- protected env: NodeJS.ProcessEnv;
31
- protected proxyProcess: ChildProcess;
32
- protected kubectl: Kubectl;
29
+ protected _port: number;
30
+ protected proxyProcess?: ChildProcess;
31
+ protected readonly acceptHosts: string;
33
32
  protected ready: boolean;
34
33
  constructor(cluster: Cluster, env: NodeJS.ProcessEnv);
35
- get acceptHosts(): string;
36
34
  get whenReady(): Promise<void> & {
37
35
  cancel(): void;
38
36
  };
@@ -23,13 +23,25 @@ import type { ContextHandler } from "./context-handler";
23
23
  export declare class KubeconfigManager {
24
24
  protected cluster: Cluster;
25
25
  protected contextHandler: ContextHandler;
26
- protected configDir: string;
27
- protected tempFile: string;
26
+ /**
27
+ * The path to the temp config file
28
+ *
29
+ * - if `string` then path
30
+ * - if `null` then not yet created
31
+ * - if `undefined` then unlinked by calling `clear()`
32
+ */
33
+ protected tempFilePath: string | null | undefined;
28
34
  constructor(cluster: Cluster, contextHandler: ContextHandler);
35
+ /**
36
+ *
37
+ * @returns The path to the temporary kubeconfig
38
+ */
29
39
  getPath(): Promise<string>;
40
+ /**
41
+ * Deletes the temporary kubeconfig file
42
+ */
30
43
  clear(): Promise<void>;
31
- unlink(): Promise<void>;
32
- protected init(): Promise<void>;
44
+ protected ensureFile(): Promise<void>;
33
45
  get resolveProxyUrl(): string;
34
46
  /**
35
47
  * Creates new "temporary" kubeconfig that point to the kubectl-proxy.
@@ -43,9 +43,16 @@ export declare class LensProxy extends Singleton {
43
43
  protected getClusterForRequest: GetClusterForRequest;
44
44
  port: number;
45
45
  constructor(router: Router, { shellApiRequest, kubeApiRequest, getClusterForRequest }: LensProxyFunctions);
46
+ /**
47
+ * Starts to listen on an OS provided port. Will reject if the server throws
48
+ * an error.
49
+ *
50
+ * Resolves with the port number that was picked
51
+ */
52
+ private attemptToListen;
46
53
  /**
47
54
  * Starts the lens proxy.
48
- * @resolves After the server is listening
55
+ * @resolves After the server is listening on a good port
49
56
  * @rejects if there is an error before that happens
50
57
  */
51
58
  listen(): Promise<void>;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Copyright (c) 2021 OpenLens Authors
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ * this software and associated documentation files (the "Software"), to deal in
6
+ * the Software without restriction, including without limitation the rights to
7
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ * the Software, and to permit persons to whom the Software is furnished to do so,
9
+ * subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ */
21
+ import { Injectable } from "@ogre-tools/injectable";
22
+ import { IComputedValue } from "mobx";
23
+ import type { LensMainExtension } from "../../extensions/lens-main-extension";
24
+ import type { MenuRegistration } from "./menu-registration";
25
+ declare const electronMenuItemsInjectable: Injectable<IComputedValue<MenuRegistration[]>, {
26
+ extensions: IComputedValue<LensMainExtension[]>;
27
+ }>;
28
+ export default electronMenuItemsInjectable;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Copyright (c) 2021 OpenLens Authors
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ * this software and associated documentation files (the "Software"), to deal in
6
+ * the Software without restriction, including without limitation the rights to
7
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ * the Software, and to permit persons to whom the Software is furnished to do so,
9
+ * subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ */
21
+ import { BrowserWindow, MenuItemConstructorOptions } from "electron";
22
+ import { IComputedValue } from "mobx";
23
+ import type { WindowManager } from "../window-manager";
24
+ import type { MenuRegistration } from "./menu-registration";
25
+ export declare type MenuTopId = "mac" | "file" | "edit" | "view" | "help";
26
+ interface MenuItemsOpts extends MenuItemConstructorOptions {
27
+ submenu?: MenuItemConstructorOptions[];
28
+ }
29
+ export declare function initMenu(windowManager: WindowManager, electronMenuItems: IComputedValue<MenuRegistration[]>): import("mobx").IReactionDisposer;
30
+ export declare function showAbout(browserWindow: BrowserWindow): void;
31
+ export declare function getAppMenu(windowManager: WindowManager, electronMenuItems: MenuRegistration[]): MenuItemsOpts[];
32
+ export declare function buildMenu(windowManager: WindowManager, electronMenuItems: MenuRegistration[]): void;
33
+ export {};
@@ -18,4 +18,4 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
- export * from "./router";
21
+ export * from "./lens-protocol-router-main/lens-protocol-router-main";
@@ -18,18 +18,23 @@
18
18
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
19
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  */
21
- import * as proto from "../../common/protocol-handler";
21
+ import * as proto from "../../../common/protocol-handler";
22
22
  import URLParse from "url-parse";
23
- import type { LensExtension } from "../../extensions/lens-extension";
24
- import { RouteAttempt } from "../../common/protocol-handler";
23
+ import type { LensExtension } from "../../../extensions/lens-extension";
24
+ import { RouteAttempt } from "../../../common/protocol-handler";
25
+ import type { ExtensionLoader } from "../../../extensions/extension-loader";
25
26
  export interface FallbackHandler {
26
27
  (name: string): Promise<boolean>;
27
28
  }
29
+ export interface Dependencies {
30
+ extensionLoader: ExtensionLoader;
31
+ }
28
32
  export declare class LensProtocolRouterMain extends proto.LensProtocolRouter {
33
+ protected dependencies: Dependencies;
29
34
  private missingExtensionHandlers;
30
35
  rendererLoaded: boolean;
31
- protected disposers: import("../../common/utils").ExtendableDisposer;
32
- constructor();
36
+ protected disposers: import("../../../common/utils").ExtendableDisposer;
37
+ constructor(dependencies: Dependencies);
33
38
  cleanup(): void;
34
39
  /**
35
40
  * Find the most specific registered handler, if it exists, and invoke it.
@@ -39,9 +44,9 @@ export declare class LensProtocolRouterMain extends proto.LensProtocolRouter {
39
44
  */
40
45
  route(rawUrl: string): Promise<void>;
41
46
  protected _executeMissingExtensionHandlers(extensionName: string): Promise<boolean>;
42
- protected _findMatchingExtensionByName(url: URLParse): Promise<LensExtension | string>;
43
- protected _routeToInternal(url: URLParse): RouteAttempt;
44
- protected _routeToExtension(url: URLParse): Promise<RouteAttempt>;
47
+ protected _findMatchingExtensionByName(url: URLParse<Record<string, string>>): Promise<LensExtension | string>;
48
+ protected _routeToInternal(url: URLParse<Record<string, string>>): RouteAttempt;
49
+ protected _routeToExtension(url: URLParse<Record<string, string>>): Promise<RouteAttempt>;
45
50
  /**
46
51
  * Add a function to the list which will be sequentially called if an extension
47
52
  * is not found while routing to the extensions
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Copyright (c) 2021 OpenLens Authors
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ * this software and associated documentation files (the "Software"), to deal in
6
+ * the Software without restriction, including without limitation the rights to
7
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ * the Software, and to permit persons to whom the Software is furnished to do so,
9
+ * subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in all
12
+ * copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ */
21
+ import type { Injectable } from "@ogre-tools/injectable";
22
+ import type { Dependencies } from "./lens-protocol-router-main";
23
+ import { LensProtocolRouterMain } from "./lens-protocol-router-main";
24
+ declare const lensProtocolRouterMainInjectable: Injectable<LensProtocolRouterMain, Dependencies>;
25
+ export default lensProtocolRouterMainInjectable;
@@ -23,6 +23,9 @@ import { BrowserWindow } from "electron";
23
23
  import windowStateKeeper from "electron-window-state";
24
24
  import { Singleton } from "../common/utils";
25
25
  import { ClusterFrameInfo } from "../common/cluster-frames";
26
+ export declare const enum IpcMainWindowEvents {
27
+ OPEN_CONTEXT_MENU = "window:open-context-menu"
28
+ }
26
29
  export interface SendToViewArgs {
27
30
  channel: string;
28
31
  frameInfo?: ClusterFrameInfo;
@@ -69,8 +69,6 @@ export declare class TerminalApi extends WebSocketApi<TerminalEvents> {
69
69
  isReady: boolean;
70
70
  constructor(query: TerminalApiQuery);
71
71
  connect(): Promise<void>;
72
- destroy(): void;
73
- reconnect(): void;
74
72
  sendMessage(message: TerminalMessage): void;
75
73
  sendTerminalSize(cols: number, rows: number): void;
76
74
  protected _onMessage({ data, ...evt }: MessageEvent<ArrayBuffer>): void;
@@ -26,10 +26,13 @@ import * as ReactRouter from "react-router";
26
26
  import * as ReactRouterDom from "react-router-dom";
27
27
  import * as LensExtensionsCommonApi from "../extensions/common-api";
28
28
  import * as LensExtensionsRendererApi from "../extensions/renderer-api";
29
+ import type { DependencyInjectionContainer } from "@ogre-tools/injectable";
30
+ import type { ExtensionLoader } from "../extensions/extension-loader";
31
+ import type { LensProtocolRouterRenderer } from "./protocol-handler";
29
32
  declare type AppComponent = React.ComponentType & {
30
- init(rootElem: HTMLElement): Promise<void>;
33
+ init(rootElem: HTMLElement, extensionLoader: ExtensionLoader, bindProtocolAddRouteHandlers?: () => void, lensProtocolRouterRendererInjectable?: LensProtocolRouterRenderer): Promise<void>;
31
34
  };
32
- export declare function bootstrap(comp: () => Promise<AppComponent>): Promise<void>;
35
+ export declare function bootstrap(comp: () => Promise<AppComponent>, di: DependencyInjectionContainer): Promise<void>;
33
36
  /**
34
37
  * Exports for virtual package "@k8slens/extensions" for renderer-process.
35
38
  * All exporting names available in global runtime scope: