@k8slens/extensions 5.3.1-git.9ce91884c2.0 → 5.3.1-git.a5e89b79d6.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.
- package/dist/src/common/catalog/catalog-entity.d.ts +51 -0
- package/dist/src/common/catalog-entities/kubernetes-cluster.d.ts +1 -2
- package/dist/src/common/catalog-entities/web-link.d.ts +0 -2
- package/dist/src/common/cluster-types.d.ts +5 -1
- package/dist/src/common/hotbar-store.d.ts +16 -11
- package/dist/src/common/hotbar-store.injectable.d.ts +4 -0
- package/dist/src/common/hotbar-types.d.ts +5 -2
- package/dist/src/{extensions/registries/welcome-menu-registry.d.ts → common/ipc/catalog.d.ts} +9 -7
- package/dist/src/common/ipc/extension-loader.ipc.d.ts +21 -0
- package/dist/src/common/ipc/index.d.ts +2 -0
- package/dist/src/common/k8s-api/endpoints/crd.api.d.ts +29 -28
- package/dist/src/common/k8s-api/kube-api-parse.d.ts +2 -2
- package/dist/src/common/k8s-api/kube-api.d.ts +35 -8
- package/dist/src/common/k8s-api/kube-json-api.d.ts +1 -2
- package/dist/src/common/protocol-handler/error.d.ts +3 -3
- package/dist/src/common/protocol-handler/router.d.ts +13 -7
- package/dist/src/common/user-store/preferences-helpers.d.ts +15 -0
- package/dist/src/common/user-store/user-store.d.ts +3 -1
- package/dist/src/common/utils/index.d.ts +1 -0
- package/dist/src/common/utils/promise-exec.d.ts +1 -2
- package/dist/src/common/utils/readableStream.d.ts +2 -2
- package/dist/src/common/vars.d.ts +1 -0
- package/dist/src/extensions/{registries/command-registry.d.ts → as-legacy-globals-for-extension-api/as-legacy-global-function-for-extension-api.d.ts} +5 -16
- package/dist/src/extensions/as-legacy-globals-for-extension-api/as-legacy-global-object-for-extension-api.d.ts +24 -0
- package/dist/src/{renderer/utils/copyToClipboard.d.ts → extensions/as-legacy-globals-for-extension-api/as-legacy-global-singleton-for-extension-api.d.ts} +7 -6
- package/dist/src/extensions/as-legacy-globals-for-extension-api/legacy-global-di-for-extension-api.d.ts +23 -0
- package/dist/src/extensions/extension-api.js +1097 -1038
- package/dist/src/extensions/extension-compatibility.d.ts +3 -1
- package/dist/src/extensions/extension-discovery.d.ts +3 -1
- package/dist/src/extensions/{extension-loader.d.ts → extension-loader/extension-loader.d.ts} +15 -7
- package/dist/src/extensions/extension-loader/extension-loader.injectable.d.ts +4 -0
- package/dist/src/{renderer/components/+404 → extensions/extension-loader}/index.d.ts +1 -1
- package/dist/src/extensions/extensions.injectable.d.ts +3 -0
- package/dist/src/{renderer/components → extensions}/getDiForUnitTesting.d.ts +0 -0
- package/dist/src/extensions/lens-extension.d.ts +2 -1
- package/dist/src/extensions/lens-main-extension.d.ts +3 -1
- package/dist/src/extensions/lens-renderer-extension.d.ts +14 -7
- package/dist/src/extensions/main-extensions.injectable.d.ts +5 -0
- package/dist/src/extensions/registries/base-registry.d.ts +1 -1
- package/dist/src/extensions/registries/entity-setting-registry.d.ts +1 -1
- package/dist/src/extensions/registries/index.d.ts +0 -5
- package/dist/src/extensions/registries/status-bar-registry.d.ts +6 -0
- package/dist/src/extensions/renderer-api/components.d.ts +1 -1
- package/dist/src/extensions/renderer-api/k8s-api.d.ts +1 -0
- package/dist/src/extensions/renderer-extensions.injectable.d.ts +5 -0
- package/dist/src/main/catalog-pusher.d.ts +1 -1
- package/dist/src/main/cluster-manager.d.ts +1 -1
- package/dist/src/main/getDi.d.ts +22 -0
- package/dist/src/main/getDiForUnitTesting.d.ts +22 -0
- package/dist/src/main/helm/helm-release-manager.d.ts +9 -10
- package/dist/src/main/helm/helm-repo-manager.d.ts +2 -2
- package/dist/src/main/helm/helm-service.d.ts +2 -2
- package/dist/src/main/initializers/index.d.ts +0 -1
- package/dist/src/main/initializers/ipc.d.ts +3 -1
- package/dist/src/main/lens-proxy.d.ts +8 -1
- package/dist/src/main/menu/electron-menu-items.injectable.d.ts +3 -0
- package/dist/src/main/menu/electron-menu-items.test.d.ts +1 -0
- package/dist/src/main/menu/menu.d.ts +33 -0
- package/dist/src/main/protocol-handler/index.d.ts +1 -1
- package/dist/src/main/protocol-handler/{router.d.ts → lens-protocol-router-main/lens-protocol-router-main.d.ts} +14 -8
- package/dist/src/main/protocol-handler/lens-protocol-router-main/lens-protocol-router-main.injectable.d.ts +4 -0
- package/dist/src/main/routes/port-forward-route.d.ts +0 -1
- package/dist/src/main/tray/tray-menu-items.injectable.d.ts +3 -0
- package/dist/src/main/tray/tray-menu-items.test.d.ts +1 -0
- package/dist/src/main/tray/tray.d.ts +27 -0
- package/dist/src/main/window-manager.d.ts +3 -0
- package/dist/src/renderer/api/__tests__/catalog-entity-registry.test.d.ts +1 -1
- package/dist/src/renderer/api/catalog-entity-registry.d.ts +4 -0
- package/dist/src/renderer/api/catalog-entity.d.ts +1 -5
- package/dist/src/{main/catalog-sources → renderer/api}/helpers/general-active-sync.d.ts +0 -0
- package/dist/src/renderer/api/terminal-api.d.ts +0 -2
- package/dist/src/renderer/bootstrap.d.ts +3 -1
- package/dist/src/renderer/cluster-frame.d.ts +2 -1
- package/dist/src/renderer/components/+catalog/catalog-entity-details.d.ts +3 -3
- package/dist/src/renderer/components/+catalog/catalog-entity-drawer-menu.d.ts +1 -2
- package/dist/src/renderer/components/+catalog/catalog-entity.store.d.ts +4 -4
- package/dist/src/renderer/components/+catalog/catalog.d.ts +5 -6
- package/dist/src/renderer/components/{command-palette/command-overlay.d.ts → +catalog/helpers.d.ts} +5 -7
- package/dist/src/renderer/components/+custom-resources/custom-resources.injectable.d.ts +23 -0
- package/dist/src/renderer/components/{clipboard/clipboard.d.ts → +extensions/attempt-install/attempt-install.d.ts} +11 -16
- package/dist/src/renderer/components/+extensions/attempt-install/attempt-install.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+extensions/attempt-install/create-temp-files-and-validate/create-temp-files-and-validate.d.ts +11 -0
- package/dist/src/renderer/components/+extensions/attempt-install/get-extension-dest-folder/get-extension-dest-folder.d.ts +1 -0
- package/dist/src/renderer/components/+extensions/attempt-install/unpack-extension/unpack-extension.d.ts +28 -0
- package/dist/src/renderer/components/+extensions/attempt-install/unpack-extension/unpack-extension.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+extensions/attempt-install/validate-package/validate-package.d.ts +22 -0
- package/dist/src/renderer/components/+extensions/attempt-install-by-info/attempt-install-by-info.d.ts +13 -0
- package/dist/src/renderer/components/+extensions/attempt-install-by-info/attempt-install-by-info.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+extensions/attempt-installs/attempt-installs.d.ts +6 -0
- package/dist/src/renderer/components/+extensions/attempt-installs/attempt-installs.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+extensions/confirm-uninstall-extension/confirm-uninstall-extension.d.ts +7 -0
- package/dist/src/renderer/components/+extensions/confirm-uninstall-extension/confirm-uninstall-extension.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+extensions/disable-extension/disable-extension.d.ts +27 -0
- package/dist/src/renderer/components/+extensions/disable-extension/disable-extension.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+extensions/enable-extension/enable-extension.d.ts +27 -0
- package/dist/src/renderer/components/+extensions/enable-extension/enable-extension.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+extensions/extensions.d.ts +1 -15
- package/dist/src/{extensions/registries/menu-registry.d.ts → renderer/components/+extensions/get-base-registry-url/get-base-registry-url.d.ts} +5 -6
- package/dist/src/renderer/components/+extensions/get-base-registry-url/get-base-registry-url.injectable.d.ts +23 -0
- package/dist/src/renderer/components/+extensions/get-message-from-error/get-message-from-error.d.ts +21 -0
- package/dist/src/renderer/components/+extensions/install-from-input/install-from-input.d.ts +29 -0
- package/dist/src/renderer/components/+extensions/install-from-input/install-from-input.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+extensions/install-from-select-file-dialog/install-from-select-file-dialog.d.ts +5 -0
- package/dist/src/renderer/components/+extensions/install-from-select-file-dialog/install-from-select-file-dialog.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+extensions/install-on-drop/install-on-drop.d.ts +5 -0
- package/dist/src/renderer/components/+extensions/install-on-drop/install-on-drop.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+extensions/read-file-notify/read-file-notify.d.ts +2 -0
- package/dist/src/renderer/components/+extensions/supported-extension-formats.d.ts +21 -0
- package/dist/src/renderer/components/+extensions/uninstall-extension/uninstall-extension.d.ts +27 -0
- package/dist/src/renderer/components/+extensions/uninstall-extension/uninstall-extension.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+extensions/user-extensions/user-extensions.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+network-policies/network-policy-details.d.ts +5 -2
- package/dist/src/renderer/components/+network-port-forwards/port-forward-menu.d.ts +2 -0
- package/dist/src/renderer/components/+network-services/service-port-component.d.ts +1 -0
- package/dist/src/renderer/components/+preferences/extension-settings.d.ts +7 -0
- package/dist/src/renderer/components/+preferences/preferences.d.ts +0 -2
- package/dist/src/renderer/components/+welcome/welcome-banner-items/welcome-banner-items.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+welcome/welcome-menu-items/get-welcome-menu-items.d.ts +27 -0
- package/dist/src/renderer/components/+welcome/welcome-menu-items/welcome-menu-items.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+welcome/welcome.d.ts +1 -3
- package/dist/src/renderer/components/+workloads-pods/pod-container-port.d.ts +1 -0
- package/dist/src/renderer/components/activate-entity-command/activate-entity-command.d.ts +1 -9
- package/dist/src/renderer/components/catalog-entities/weblink-add-command.d.ts +1 -11
- package/dist/src/renderer/components/checkbox/checkbox.d.ts +0 -1
- package/dist/src/renderer/components/cluster-manager/active-hotbar-name.d.ts +22 -0
- package/dist/src/renderer/components/cluster-manager/bottom-bar.d.ts +0 -1
- package/dist/src/renderer/components/command-palette/command-container.d.ts +1 -7
- package/dist/src/renderer/components/command-palette/command-dialog.d.ts +1 -13
- package/dist/src/renderer/components/command-palette/command-overlay.injectable.d.ts +31 -0
- package/dist/src/renderer/components/command-palette/index.d.ts +1 -1
- package/dist/src/renderer/components/command-palette/registered-commands/internal-commands.injectable.d.ts +25 -0
- package/dist/src/renderer/components/command-palette/registered-commands/registered-commands.injectable.d.ts +25 -0
- package/dist/src/renderer/components/dialog/dialog.d.ts +1 -0
- package/dist/src/renderer/components/dock/install-chart.d.ts +0 -1
- package/dist/src/renderer/components/dock/terminal.d.ts +1 -2
- package/dist/src/renderer/components/hotbar/hotbar-add-command.d.ts +1 -6
- package/dist/src/renderer/components/hotbar/hotbar-menu.d.ts +1 -1
- package/dist/src/renderer/components/hotbar/hotbar-remove-command.d.ts +1 -9
- package/dist/src/renderer/components/hotbar/hotbar-rename-command.d.ts +1 -14
- package/dist/src/renderer/components/hotbar/hotbar-selector.d.ts +3 -3
- package/dist/src/renderer/components/hotbar/hotbar-switch-command.d.ts +1 -12
- package/dist/src/renderer/components/input/input.d.ts +1 -0
- package/dist/src/renderer/components/input/validators/unique-hotbar-name.injectable.d.ts +24 -0
- package/dist/src/renderer/components/kube-object-menu/dependencies/api-manager.injectable.d.ts +3 -0
- package/dist/src/{main/tray.d.ts → renderer/components/kube-object-menu/dependencies/cluster-name.injectable.d.ts} +3 -5
- package/dist/src/renderer/components/kube-object-menu/dependencies/cluster.injectable.d.ts +3 -0
- package/dist/src/renderer/components/kube-object-menu/dependencies/edit-resource-tab.injectable.d.ts +24 -0
- package/dist/src/renderer/components/kube-object-menu/dependencies/hide-details.injectable.d.ts +24 -0
- package/dist/src/renderer/components/kube-object-menu/dependencies/kube-object-menu-items/get-kube-object-menu-items.d.ts +26 -0
- package/dist/src/renderer/components/kube-object-menu/dependencies/kube-object-menu-items/kube-object-menu-items.injectable.d.ts +9 -0
- package/dist/src/renderer/components/kube-object-menu/dependencies/kube-object-menu-items/kube-object-menu-registry.injectable.d.ts +24 -0
- package/dist/src/renderer/components/kube-object-menu/index.d.ts +2 -1
- package/dist/src/renderer/components/kube-object-menu/kube-object-menu.d.ts +4 -13
- package/dist/src/renderer/components/{layout/__tests__/topbar.test.d.ts → kube-object-menu/kube-object-menu.test.d.ts} +0 -0
- package/dist/src/renderer/components/kubeconfig-dialog/kubeconfig-dialog.d.ts +0 -1
- package/dist/src/renderer/components/layout/{topbar.d.ts → close-button.d.ts} +3 -3
- package/dist/src/renderer/components/layout/top-bar/top-bar-items/top-bar-items.injectable.d.ts +3 -0
- package/dist/src/renderer/components/{clipboard/index.d.ts → layout/top-bar/top-bar-win-linux.test.d.ts} +1 -1
- package/dist/src/renderer/components/layout/top-bar/top-bar.d.ts +22 -0
- package/dist/src/{main/initializers/registries.d.ts → renderer/components/layout/top-bar/top-bar.test.d.ts} +1 -1
- package/dist/src/renderer/components/menu/menu-actions.d.ts +1 -1
- package/dist/src/renderer/components/monaco-editor/monaco-editor.d.ts +1 -1
- package/dist/src/renderer/components/switch/__tests__/switch.test.d.ts +21 -0
- package/dist/src/renderer/components/switch/form-switcher.d.ts +3 -0
- package/dist/src/renderer/components/switch/index.d.ts +1 -0
- package/dist/src/{extensions/registries/topbar-registry.d.ts → renderer/components/switch/switch.d.ts} +4 -9
- package/dist/src/renderer/components/switch/switcher.d.ts +4 -1
- package/dist/src/renderer/components/{getDi.d.ts → test-utils/renderFor.d.ts} +6 -1
- package/dist/src/renderer/{components/+404/not-found.d.ts → getDi.d.ts} +2 -4
- package/dist/src/renderer/getDiForUnitTesting.d.ts +22 -0
- package/dist/src/renderer/initializers/catalog.d.ts +6 -1
- package/dist/src/renderer/initializers/index.d.ts +1 -2
- package/dist/src/renderer/initializers/ipc.d.ts +2 -1
- package/dist/src/renderer/initializers/status-bar-registry.d.ts +21 -0
- package/dist/src/renderer/navigation/helpers.d.ts +1 -1
- package/dist/src/renderer/port-forward/port-forward-dialog.d.ts +1 -1
- package/dist/src/renderer/port-forward/port-forward-item.d.ts +4 -4
- package/dist/src/renderer/port-forward/port-forward-notify.d.ts +1 -0
- package/dist/src/renderer/port-forward/port-forward.store.d.ts +56 -6
- package/dist/src/{main/menu.d.ts → renderer/protocol-handler/bind-protocol-add-route-handlers/bind-protocol-add-route-handlers.d.ts} +8 -6
- package/dist/src/renderer/protocol-handler/bind-protocol-add-route-handlers/bind-protocol-add-route-handlers.injectable.d.ts +3 -0
- package/dist/src/renderer/protocol-handler/index.d.ts +2 -2
- package/dist/src/renderer/protocol-handler/{router.d.ts → lens-protocol-router-renderer/lens-protocol-router-renderer.d.ts} +8 -1
- package/dist/src/renderer/protocol-handler/lens-protocol-router-renderer/lens-protocol-router-renderer.injectable.d.ts +4 -0
- package/dist/src/renderer/root-frame.d.ts +3 -1
- package/dist/src/renderer/theme.store.d.ts +6 -4
- package/dist/src/renderer/utils/index.d.ts +0 -1
- package/dist/src/{extensions/registries/welcome-banner-registry.d.ts → renderer/window/event-listener.injectable.d.ts} +5 -18
- package/package.json +1 -1
- package/dist/src/renderer/components/hotbar/hotbar-display-label.d.ts +0 -22
- package/dist/src/renderer/initializers/command-registry.d.ts +0 -21
- package/dist/src/renderer/initializers/welcome-menu-registry.d.ts +0 -21
- package/dist/src/renderer/protocol-handler/app-handlers.d.ts +0 -21
|
@@ -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
|
|
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;
|
package/dist/src/extensions/{extension-loader.d.ts → extension-loader/extension-loader.d.ts}
RENAMED
|
@@ -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
|
|
22
|
-
import type {
|
|
23
|
-
import type {
|
|
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
|
|
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
|
|
@@ -74,9 +76,15 @@ export declare class ExtensionLoader extends Singleton {
|
|
|
74
76
|
broadcastExtensions(): void;
|
|
75
77
|
syncExtensions(extensions: [LensExtensionId, InstalledExtension][]): void;
|
|
76
78
|
loadOnMain(): void;
|
|
77
|
-
loadOnClusterManagerRenderer():
|
|
78
|
-
|
|
79
|
-
|
|
79
|
+
loadOnClusterManagerRenderer(): {
|
|
80
|
+
isBundled: boolean;
|
|
81
|
+
loaded: Promise<void>;
|
|
82
|
+
}[];
|
|
83
|
+
loadOnClusterRenderer(entity: KubernetesCluster): void;
|
|
84
|
+
protected autoInitExtensions(register: (ext: LensExtension) => Promise<Disposer[]>): {
|
|
85
|
+
isBundled: boolean;
|
|
86
|
+
loaded: Promise<void>;
|
|
87
|
+
}[];
|
|
80
88
|
protected requireExtension(extension: InstalledExtension): LensExtensionConstructor | null;
|
|
81
89
|
getExtension(extId: LensExtensionId): InstalledExtension;
|
|
82
90
|
getInstanceById<E extends LensExtension>(extId: LensExtensionId): E;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="@ogre-tools/injectable" />
|
|
2
|
+
import { ExtensionLoader } from "./extension-loader";
|
|
3
|
+
declare const extensionLoaderInjectable: import("@ogre-tools/injectable").Injectable<import("@ogre-tools/injectable").InjectionToken<ExtensionLoader, unknown>, ExtensionLoader, unknown>;
|
|
4
|
+
export default extensionLoaderInjectable;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="@ogre-tools/injectable" />
|
|
2
|
+
declare const extensionsInjectable: import("@ogre-tools/injectable").Injectable<import("@ogre-tools/injectable").InjectionToken<import("mobx").IComputedValue<import("./lens-extension").LensExtension[]>, unknown>, import("mobx").IComputedValue<import("./lens-extension").LensExtension[]>, unknown>;
|
|
3
|
+
export default extensionsInjectable;
|
|
File without changes
|
|
@@ -37,7 +37,8 @@ export declare class LensExtension {
|
|
|
37
37
|
readonly manifestPath: string;
|
|
38
38
|
readonly isBundled: boolean;
|
|
39
39
|
protocolHandlers: ProtocolHandlerRegistration[];
|
|
40
|
-
private
|
|
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,9 +21,11 @@
|
|
|
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 "
|
|
24
|
+
import type { MenuRegistration } from "../main/menu/menu-registration";
|
|
25
|
+
import type { TrayMenuRegistration } from "../main/tray/tray-menu-registration";
|
|
25
26
|
export declare class LensMainExtension extends LensExtension {
|
|
26
27
|
appMenus: MenuRegistration[];
|
|
28
|
+
trayMenus: TrayMenuRegistration[];
|
|
27
29
|
navigate(pageId?: string, params?: Record<string, any>, frameId?: number): Promise<void>;
|
|
28
30
|
addCatalogSource(id: string, source: IObservableArray<CatalogEntity>): void;
|
|
29
31
|
removeCatalogSource(id: string): void;
|
|
@@ -19,12 +19,16 @@
|
|
|
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 { TopBarRegistration } from "../renderer/components/layout/top-bar/top-bar-registration";
|
|
28
|
+
import type { KubernetesCluster } from "../common/catalog-entities";
|
|
29
|
+
import type { WelcomeMenuRegistration } from "../renderer/components/+welcome/welcome-menu-items/welcome-menu-registration";
|
|
30
|
+
import type { WelcomeBannerRegistration } from "../renderer/components/+welcome/welcome-banner-items/welcome-banner-registration";
|
|
31
|
+
import type { CommandRegistration } from "../renderer/components/command-palette/registered-commands/commands";
|
|
28
32
|
export declare class LensRendererExtension extends LensExtension {
|
|
29
33
|
globalPages: registries.PageRegistration[];
|
|
30
34
|
clusterPages: registries.PageRegistration[];
|
|
@@ -36,16 +40,19 @@ export declare class LensRendererExtension extends LensExtension {
|
|
|
36
40
|
kubeObjectDetailItems: registries.KubeObjectDetailRegistration[];
|
|
37
41
|
kubeObjectMenuItems: registries.KubeObjectMenuRegistration[];
|
|
38
42
|
kubeWorkloadsOverviewItems: registries.WorkloadsOverviewDetailRegistration[];
|
|
39
|
-
commands:
|
|
40
|
-
welcomeMenus:
|
|
41
|
-
welcomeBanners:
|
|
43
|
+
commands: CommandRegistration[];
|
|
44
|
+
welcomeMenus: WelcomeMenuRegistration[];
|
|
45
|
+
welcomeBanners: WelcomeBannerRegistration[];
|
|
42
46
|
catalogEntityDetailItems: registries.CatalogEntityDetailRegistration<CatalogEntity>[];
|
|
43
|
-
topBarItems:
|
|
47
|
+
topBarItems: TopBarRegistration[];
|
|
44
48
|
navigate<P extends object>(pageId?: string, params?: P): Promise<void>;
|
|
45
49
|
/**
|
|
46
|
-
* Defines if extension is enabled for a given cluster.
|
|
50
|
+
* Defines if extension is enabled for a given cluster. This method is only
|
|
51
|
+
* called when the extension is created within a cluster frame.
|
|
52
|
+
*
|
|
53
|
+
* The default implementation is to return `true`
|
|
47
54
|
*/
|
|
48
|
-
isEnabledForCluster(cluster:
|
|
55
|
+
isEnabledForCluster(cluster: KubernetesCluster): Promise<Boolean>;
|
|
49
56
|
/**
|
|
50
57
|
* Add a filtering function for the catalog entities. This will be removed if the extension is disabled.
|
|
51
58
|
* @param fn The function which should return a truthy value for those entities which should be kept.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="@ogre-tools/injectable" />
|
|
2
|
+
import type { IComputedValue } from "mobx";
|
|
3
|
+
import type { LensMainExtension } from "./lens-main-extension";
|
|
4
|
+
declare const mainExtensionsInjectable: import("@ogre-tools/injectable").Injectable<import("@ogre-tools/injectable").InjectionToken<IComputedValue<LensMainExtension[]>, unknown>, IComputedValue<LensMainExtension[]>, unknown>;
|
|
5
|
+
export default mainExtensionsInjectable;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
20
|
*/
|
|
21
21
|
import { Singleton } from "../../common/utils";
|
|
22
|
-
import { LensExtension } from "../lens-extension";
|
|
22
|
+
import type { LensExtension } from "../lens-extension";
|
|
23
23
|
export declare class BaseRegistry<T, I = T> extends Singleton {
|
|
24
24
|
private items;
|
|
25
25
|
constructor();
|
|
@@ -42,5 +42,5 @@ export interface RegisteredEntitySetting extends EntitySettingRegistration {
|
|
|
42
42
|
}
|
|
43
43
|
export declare class EntitySettingRegistry extends BaseRegistry<EntitySettingRegistration, RegisteredEntitySetting> {
|
|
44
44
|
getRegisteredItem(item: EntitySettingRegistration): RegisteredEntitySetting;
|
|
45
|
-
getItemsForKind(kind: string, apiVersion: string, source?: string)
|
|
45
|
+
getItemsForKind: (kind: string, apiVersion: string, source?: string) => RegisteredEntitySetting[];
|
|
46
46
|
}
|
|
@@ -20,17 +20,12 @@
|
|
|
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";
|
|
27
26
|
export * from "./kube-object-menu-registry";
|
|
28
27
|
export * from "./kube-object-status-registry";
|
|
29
|
-
export * from "./command-registry";
|
|
30
28
|
export * from "./entity-setting-registry";
|
|
31
|
-
export * from "./welcome-menu-registry";
|
|
32
|
-
export * from "./welcome-banner-registry";
|
|
33
29
|
export * from "./catalog-entity-detail-registry";
|
|
34
30
|
export * from "./workloads-overview-detail-registry";
|
|
35
|
-
export * from "./topbar-registry";
|
|
36
31
|
export * from "./protocol-handler";
|
|
@@ -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;
|
|
@@ -30,7 +30,7 @@ export * from "../../renderer/components/select";
|
|
|
30
30
|
export * from "../../renderer/components/slider";
|
|
31
31
|
export * from "../../renderer/components/switch";
|
|
32
32
|
export * from "../../renderer/components/input/input";
|
|
33
|
-
export
|
|
33
|
+
export declare const CommandOverlay: import("../../renderer/components/command-palette/command-overlay.injectable").CommandOverlay;
|
|
34
34
|
export * from "../../renderer/components/icon";
|
|
35
35
|
export * from "../../renderer/components/tooltip";
|
|
36
36
|
export * from "../../renderer/components/tabs";
|
|
@@ -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";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="@ogre-tools/injectable" />
|
|
2
|
+
import type { IComputedValue } from "mobx";
|
|
3
|
+
import type { LensRendererExtension } from "./lens-renderer-extension";
|
|
4
|
+
declare const rendererExtensionsInjectable: import("@ogre-tools/injectable").Injectable<import("@ogre-tools/injectable").InjectionToken<IComputedValue<LensRendererExtension[]>, unknown>, IComputedValue<LensRendererExtension[]>, unknown>;
|
|
5
|
+
export default rendererExtensionsInjectable;
|
|
@@ -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("
|
|
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;
|
|
@@ -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,27 +18,26 @@
|
|
|
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
|
-
|
|
22
|
-
export declare function
|
|
23
|
-
export declare function installChart(chart: string, values: any, name: string | undefined, namespace: string, version: string, pathToKubeconfig: string): Promise<{
|
|
21
|
+
export declare function listReleases(pathToKubeconfig: string, namespace?: string): Promise<Record<string, any>[]>;
|
|
22
|
+
export declare function installChart(chart: string, values: any, name: string | undefined, namespace: string, version: string, kubeconfigPath: string): Promise<{
|
|
24
23
|
log: string;
|
|
25
24
|
release: {
|
|
26
25
|
name: string;
|
|
27
26
|
namespace: string;
|
|
28
27
|
};
|
|
29
28
|
}>;
|
|
30
|
-
export declare function upgradeRelease(name: string, chart: string, values: any, namespace: string, version: string,
|
|
29
|
+
export declare function upgradeRelease(name: string, chart: string, values: any, namespace: string, version: string, kubeconfigPath: string, kubectlPath: string): Promise<{
|
|
31
30
|
log: string;
|
|
32
31
|
release: Promise<any>;
|
|
33
32
|
}>;
|
|
34
|
-
export declare function getRelease(name: string, namespace: string,
|
|
35
|
-
export declare function deleteRelease(name: string, namespace: string,
|
|
33
|
+
export declare function getRelease(name: string, namespace: string, kubeconfigPath: string, kubectlPath: string): Promise<any>;
|
|
34
|
+
export declare function deleteRelease(name: string, namespace: string, kubeconfigPath: string): Promise<string>;
|
|
36
35
|
interface GetValuesOptions {
|
|
37
36
|
namespace: string;
|
|
38
37
|
all?: boolean;
|
|
39
|
-
|
|
38
|
+
kubeconfigPath: string;
|
|
40
39
|
}
|
|
41
|
-
export declare function getValues(name: string, { namespace, all,
|
|
42
|
-
export declare function getHistory(name: string, namespace: string,
|
|
43
|
-
export declare function rollback(name: string, namespace: string, revision: number,
|
|
40
|
+
export declare function getValues(name: string, { namespace, all, kubeconfigPath }: GetValuesOptions): Promise<string>;
|
|
41
|
+
export declare function getHistory(name: string, namespace: string, kubeconfigPath: string): Promise<any>;
|
|
42
|
+
export declare function rollback(name: string, namespace: string, revision: number, kubeconfigPath: string): Promise<any>;
|
|
44
43
|
export {};
|
|
@@ -47,8 +47,8 @@ export declare class HelmRepoManager extends Singleton {
|
|
|
47
47
|
repo(name: string): Promise<HelmRepo>;
|
|
48
48
|
private readConfig;
|
|
49
49
|
repositories(): Promise<HelmRepo[]>;
|
|
50
|
-
static update(): Promise<
|
|
50
|
+
static update(): Promise<string>;
|
|
51
51
|
static addRepo({ name, url }: HelmRepo): Promise<string>;
|
|
52
|
-
static addCustomRepo(
|
|
52
|
+
static addCustomRepo({ name, url, insecureSkipTlsVerify, username, password, caFile, keyFile, certFile }: HelmRepo): Promise<string>;
|
|
53
53
|
static removeRepo({ name, url }: HelmRepo): Promise<string>;
|
|
54
54
|
}
|
|
@@ -44,7 +44,7 @@ declare class HelmService {
|
|
|
44
44
|
versions: import("../../common/k8s-api/endpoints/helm-charts.api").RawHelmChart[];
|
|
45
45
|
}>;
|
|
46
46
|
getChartValues(repoName: string, chartName: string, version?: string): Promise<string>;
|
|
47
|
-
listReleases(cluster: Cluster, namespace?: string): Promise<any>;
|
|
47
|
+
listReleases(cluster: Cluster, namespace?: string): Promise<Record<string, any>[]>;
|
|
48
48
|
getRelease(cluster: Cluster, releaseName: string, namespace: string): Promise<any>;
|
|
49
49
|
getReleaseValues(releaseName: string, { cluster, namespace, all }: GetReleaseValuesArgs): Promise<string>;
|
|
50
50
|
getReleaseHistory(cluster: Cluster, releaseName: string, namespace: string): Promise<any>;
|
|
@@ -58,7 +58,7 @@ declare class HelmService {
|
|
|
58
58
|
release: Promise<any>;
|
|
59
59
|
}>;
|
|
60
60
|
rollback(cluster: Cluster, releaseName: string, namespace: string, revision: number): Promise<{
|
|
61
|
-
message: Promise<
|
|
61
|
+
message: Promise<any>;
|
|
62
62
|
}>;
|
|
63
63
|
}
|
|
64
64
|
export declare const helmService: HelmService;
|
|
@@ -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
|
-
|
|
21
|
+
import type { MenuRegistration } from "../menu/menu-registration";
|
|
22
|
+
import type { IComputedValue } from "mobx";
|
|
23
|
+
export declare function initIpcMainHandlers(electronMenuItems: IComputedValue<MenuRegistration[]>): void;
|
|
@@ -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,3 @@
|
|
|
1
|
+
/// <reference types="@ogre-tools/injectable" />
|
|
2
|
+
declare const electronMenuItemsInjectable: import("@ogre-tools/injectable").Injectable<import("@ogre-tools/injectable").InjectionToken<import("mobx").IComputedValue<import("./menu-registration").MenuRegistration[]>, unknown>, import("mobx").IComputedValue<import("./menu-registration").MenuRegistration[]>, unknown>;
|
|
3
|
+
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,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 "
|
|
21
|
+
import * as proto from "../../../common/protocol-handler";
|
|
22
22
|
import URLParse from "url-parse";
|
|
23
|
-
import type { LensExtension } from "
|
|
24
|
-
import { RouteAttempt } from "
|
|
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
|
+
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("
|
|
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
|
|
@@ -49,3 +54,4 @@ export declare class LensProtocolRouterMain extends proto.LensProtocolRouter {
|
|
|
49
54
|
*/
|
|
50
55
|
addMissingExtensionHandler(handler: FallbackHandler): void;
|
|
51
56
|
}
|
|
57
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="@ogre-tools/injectable" />
|
|
2
|
+
import { LensProtocolRouterMain } from "./lens-protocol-router-main";
|
|
3
|
+
declare const lensProtocolRouterMainInjectable: import("@ogre-tools/injectable").Injectable<import("@ogre-tools/injectable").InjectionToken<LensProtocolRouterMain, unknown>, LensProtocolRouterMain, unknown>;
|
|
4
|
+
export default lensProtocolRouterMainInjectable;
|
|
@@ -22,6 +22,5 @@ import type { LensApiRequest } from "../router";
|
|
|
22
22
|
export declare class PortForwardRoute {
|
|
23
23
|
static routePortForward(request: LensApiRequest): Promise<void>;
|
|
24
24
|
static routeCurrentPortForward(request: LensApiRequest): Promise<void>;
|
|
25
|
-
static routeAllPortForwards(request: LensApiRequest): Promise<void>;
|
|
26
25
|
static routeCurrentPortForwardStop(request: LensApiRequest): Promise<void>;
|
|
27
26
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="@ogre-tools/injectable" />
|
|
2
|
+
declare const trayItemsInjectable: import("@ogre-tools/injectable").Injectable<import("@ogre-tools/injectable").InjectionToken<import("mobx").IComputedValue<import("./tray-menu-registration").TrayMenuRegistration[]>, unknown>, import("mobx").IComputedValue<import("./tray-menu-registration").TrayMenuRegistration[]>, unknown>;
|
|
3
|
+
export default trayItemsInjectable;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
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 { Tray } from "electron";
|
|
22
|
+
import { IComputedValue } from "mobx";
|
|
23
|
+
import type { WindowManager } from "../window-manager";
|
|
24
|
+
import type { TrayMenuRegistration } from "./tray-menu-registration";
|
|
25
|
+
export declare let tray: Tray;
|
|
26
|
+
export declare function getTrayIcon(): string;
|
|
27
|
+
export declare function initTray(windowManager: WindowManager, trayMenuItems: IComputedValue<TrayMenuRegistration[]>): () => void;
|
|
@@ -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;
|
|
@@ -25,6 +25,10 @@ import { Disposer } from "../utils";
|
|
|
25
25
|
import { CatalogRunEvent } from "../../common/catalog/catalog-run-event";
|
|
26
26
|
export declare type EntityFilter = (entity: CatalogEntity) => any;
|
|
27
27
|
export declare type CatalogEntityOnBeforeRun = (event: CatalogRunEvent) => void | Promise<void>;
|
|
28
|
+
export declare const catalogEntityRunContext: {
|
|
29
|
+
navigate: (url: string) => void;
|
|
30
|
+
setCommandPaletteContext: (entity?: CatalogEntity) => void;
|
|
31
|
+
};
|
|
28
32
|
export declare class CatalogEntityRegistry {
|
|
29
33
|
private categoryRegistry;
|
|
30
34
|
protected activeEntityId: string | undefined;
|