@k8slens/extensions 5.6.0-git.f4b7fea54a.0 → 5.6.0-git.f7f41cab79.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/__mocks__/monaco-editor.ts +9 -0
- package/dist/src/behaviours/helm-charts/{navigation-to-helm-charts.test.d.ts → installing-chart/installing-helm-chart-from-new-tab.test.d.ts} +0 -0
- package/dist/src/behaviours/helm-charts/installing-chart/installing-helm-chart-from-previously-opened-tab.test.d.ts +1 -0
- package/dist/src/behaviours/helm-charts/installing-chart/opening-dock-tab-for-installing-helm-chart.test.d.ts +1 -0
- package/dist/src/common/logger.d.ts +1 -2
- package/dist/src/common/utils/get-random-id.injectable.d.ts +1 -1
- package/dist/src/extensions/extension-api.js +38 -49
- package/dist/src/main/utils/get-port.d.ts +2 -1
- package/dist/src/renderer/{components/+helm-charts/helm-chart-details.test.d.ts → api/__tests__/websocket-api.test.d.ts} +0 -0
- package/dist/src/renderer/api/websocket-api.d.ts +1 -3
- package/dist/src/renderer/components/+helm-charts/details/readme/call-for-helm-chart-readme.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+helm-charts/details/readme-of-selected-helm-chart.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+helm-charts/details/versions/call-for-helm-chart-versions.injectable.d.ts +4 -0
- package/dist/src/renderer/components/+helm-charts/details/versions/helm-chart-details-version-selection.injectable.d.ts +14 -0
- package/dist/src/renderer/components/+helm-charts/details/versions-of-selected-helm-chart.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+helm-charts/helm-chart-details.d.ts +1 -1
- package/dist/src/renderer/components/+helm-charts/helm-chart-store.injectable.d.ts +3 -0
- package/dist/src/renderer/components/+helm-charts/helm-charts/call-for-helm-charts.injectable.d.ts +4 -0
- package/dist/src/renderer/components/+helm-charts/helm-charts/helm-charts.injectable.d.ts +2 -0
- package/dist/src/renderer/components/+helm-charts/helm-charts/selected-helm-chart.injectable.d.ts +2 -0
- package/dist/src/renderer/components/+helm-releases/create-release/call-for-create-helm-release.injectable.d.ts +4 -0
- package/dist/src/renderer/components/dock/editor-panel.d.ts +1 -0
- package/dist/src/renderer/components/dock/info-panel.d.ts +3 -0
- package/dist/src/renderer/components/dock/install-chart/chart-data/call-for-helm-chart-values.injectable.d.ts +3 -0
- package/dist/src/renderer/components/dock/install-chart/create-install-chart-tab.injectable.d.ts +2 -2
- package/dist/src/renderer/components/dock/install-chart/get-random-install-chart-tab-id.injectable.d.ts +2 -0
- package/dist/src/renderer/components/dock/install-chart/install-chart-model.injectable.d.ts +67 -0
- package/dist/src/renderer/components/dock/install-chart/store.d.ts +0 -4
- package/dist/src/renderer/components/monaco-editor/__mocks__/monaco-editor.d.ts +3 -0
- package/dist/src/renderer/components/table/table-row.d.ts +1 -0
- package/dist/src/renderer/components/test-utils/get-application-builder.d.ts +6 -2
- package/dist/src/renderer/utils/create-storage/create-storage.d.ts +2 -1
- package/dist/src/renderer/utils/create-storage/storage-save-delay.injectable.d.ts +2 -0
- package/dist/src/renderer/utils/create-storage/storages-are-ready.d.ts +6 -0
- package/package.json +1 -1
|
@@ -17,6 +17,7 @@ interface GetPortArgs {
|
|
|
17
17
|
};
|
|
18
18
|
raw?: RegExpExecArray;
|
|
19
19
|
};
|
|
20
|
+
rawMatcher: string;
|
|
20
21
|
};
|
|
21
22
|
/**
|
|
22
23
|
* Called when the port is found
|
|
@@ -24,7 +25,7 @@ interface GetPortArgs {
|
|
|
24
25
|
onFind?: () => void;
|
|
25
26
|
/**
|
|
26
27
|
* Timeout for how long to wait for the port.
|
|
27
|
-
* Default:
|
|
28
|
+
* Default: 15s
|
|
28
29
|
*/
|
|
29
30
|
timeout?: number;
|
|
30
31
|
}
|
|
File without changes
|
|
@@ -60,11 +60,9 @@ export declare class WebSocketApi<Events extends WebSocketEvents> extends WebSoc
|
|
|
60
60
|
readyState: WebSocketApiState;
|
|
61
61
|
private static readonly defaultParams;
|
|
62
62
|
constructor(params: WebsocketApiParams);
|
|
63
|
-
|
|
63
|
+
isConnected(): this is (WebSocketApi<Events> & {
|
|
64
64
|
socket: WebSocket;
|
|
65
65
|
});
|
|
66
|
-
get isConnected(): boolean;
|
|
67
|
-
get isOnline(): boolean;
|
|
68
66
|
connect(url: string): void;
|
|
69
67
|
ping(): void;
|
|
70
68
|
reconnect(): void;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare type CallForHelmChartReadme = (repo: string, name: string, version: string) => Promise<string>;
|
|
2
|
+
declare const callForHelmChartReadmeInjectable: import("@ogre-tools/injectable").Injectable<CallForHelmChartReadme, unknown, void>;
|
|
3
|
+
export default callForHelmChartReadmeInjectable;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { HelmChart } from "../../../../common/k8s-api/endpoints/helm-charts.api";
|
|
2
|
+
declare const readmeOfSelectedHelmChartInjectable: import("@ogre-tools/injectable").Injectable<import("@ogre-tools/injectable-react").IAsyncComputed<string>, unknown, HelmChart>;
|
|
3
|
+
export default readmeOfSelectedHelmChartInjectable;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { HelmChart } from "../../../../../common/k8s-api/endpoints/helm-charts.api";
|
|
2
|
+
export declare type CallForHelmChartVersions = (repo: string, name: string) => Promise<HelmChart[]>;
|
|
3
|
+
declare const callForHelmChartVersionsInjectable: import("@ogre-tools/injectable").Injectable<CallForHelmChartVersions, unknown, void>;
|
|
4
|
+
export default callForHelmChartVersionsInjectable;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { IComputedValue } from "mobx";
|
|
2
|
+
import type { HelmChart } from "../../../../../common/k8s-api/endpoints/helm-charts.api";
|
|
3
|
+
import type { SingleValue } from "react-select";
|
|
4
|
+
interface VersionSelectionOption {
|
|
5
|
+
label: string;
|
|
6
|
+
value: HelmChart;
|
|
7
|
+
}
|
|
8
|
+
export interface HelmChartDetailsVersionSelection {
|
|
9
|
+
value: IComputedValue<HelmChart | undefined>;
|
|
10
|
+
options: IComputedValue<VersionSelectionOption[]>;
|
|
11
|
+
onChange: (option: SingleValue<VersionSelectionOption>) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const helmChartDetailsVersionSelectionInjectable: import("@ogre-tools/injectable").Injectable<HelmChartDetailsVersionSelection, unknown, HelmChart>;
|
|
14
|
+
export default helmChartDetailsVersionSelectionInjectable;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { HelmChart } from "../../../../common/k8s-api/endpoints/helm-charts.api";
|
|
2
|
+
declare const versionsOfSelectedHelmChartInjectable: import("@ogre-tools/injectable").Injectable<import("@ogre-tools/injectable-react").IAsyncComputed<HelmChart[]>, unknown, HelmChart>;
|
|
3
|
+
export default versionsOfSelectedHelmChartInjectable;
|
|
@@ -6,7 +6,7 @@ import "./helm-chart-details.scss";
|
|
|
6
6
|
import React from "react";
|
|
7
7
|
import type { HelmChart } from "../../../common/k8s-api/endpoints/helm-charts.api";
|
|
8
8
|
export interface HelmChartDetailsProps {
|
|
9
|
-
chart: HelmChart;
|
|
10
9
|
hideDetails(): void;
|
|
10
|
+
chart: HelmChart;
|
|
11
11
|
}
|
|
12
12
|
export declare const HelmChartDetails: React.FunctionComponent<HelmChartDetailsProps>;
|
package/dist/src/renderer/components/+helm-charts/helm-charts/call-for-helm-charts.injectable.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { HelmChart } from "../../../../common/k8s-api/endpoints/helm-charts.api";
|
|
2
|
+
export declare type CallForHelmCharts = () => Promise<HelmChart[]>;
|
|
3
|
+
declare const callForHelmChartsInjectable: import("@ogre-tools/injectable").Injectable<CallForHelmCharts, unknown, void>;
|
|
4
|
+
export default callForHelmChartsInjectable;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { HelmReleaseCreatePayload, HelmReleaseUpdateDetails } from "../../../../common/k8s-api/endpoints/helm-releases.api";
|
|
2
|
+
export declare type CallForCreateHelmRelease = (payload: HelmReleaseCreatePayload) => Promise<HelmReleaseUpdateDetails>;
|
|
3
|
+
declare const callForCreateHelmReleaseInjectable: import("@ogre-tools/injectable").Injectable<CallForCreateHelmRelease, unknown, void>;
|
|
4
|
+
export default callForCreateHelmReleaseInjectable;
|
|
@@ -22,5 +22,8 @@ export interface OptionalProps {
|
|
|
22
22
|
showInlineInfo?: boolean;
|
|
23
23
|
showNotifications?: boolean;
|
|
24
24
|
showStatusPanel?: boolean;
|
|
25
|
+
submitTestId?: string;
|
|
26
|
+
cancelTestId?: string;
|
|
27
|
+
submittingTestId?: string;
|
|
25
28
|
}
|
|
26
29
|
export declare const InfoPanel: React.FunctionComponent<InfoPanelProps>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare type CallForHelmChartValues = (repo: string, name: string, version: string) => Promise<string>;
|
|
2
|
+
declare const callForHelmChartValuesInjectable: import("@ogre-tools/injectable").Injectable<CallForHelmChartValues, unknown, void>;
|
|
3
|
+
export default callForHelmChartValuesInjectable;
|
package/dist/src/renderer/components/dock/install-chart/create-install-chart-tab.injectable.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HelmChart } from "../../../../common/k8s-api/endpoints/helm-charts.api";
|
|
2
|
-
import type { DockTab,
|
|
2
|
+
import type { DockTab, DockTabCreateSpecific } from "../dock/store";
|
|
3
3
|
export declare type CreateInstallChartTab = (chart: HelmChart, tabParams?: DockTabCreateSpecific) => DockTab;
|
|
4
|
-
declare const createInstallChartTabInjectable: import("@ogre-tools/injectable").Injectable<(chart: HelmChart, tabParams?: DockTabCreateSpecific) => Required<DockTabCreate>, unknown, void>;
|
|
4
|
+
declare const createInstallChartTabInjectable: import("@ogre-tools/injectable").Injectable<(chart: HelmChart, tabParams?: DockTabCreateSpecific) => Required<import("../dock/store").DockTabCreate>, unknown, void>;
|
|
5
5
|
export default createInstallChartTabInjectable;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { CallForHelmChartValues } from "./chart-data/call-for-helm-chart-values.injectable";
|
|
2
|
+
import type { InstallChartTabStore } from "./store";
|
|
3
|
+
import type { CallForCreateHelmRelease } from "../../+helm-releases/create-release/call-for-create-helm-release.injectable";
|
|
4
|
+
import type { HelmReleaseUpdateDetails } from "../../../../common/k8s-api/endpoints/helm-releases.api";
|
|
5
|
+
import type { NavigateToHelmReleases } from "../../../../common/front-end-routing/routes/cluster/helm/releases/navigate-to-helm-releases.injectable";
|
|
6
|
+
import type { SingleValue } from "react-select";
|
|
7
|
+
import type { CallForHelmChartVersions } from "../../+helm-charts/details/versions/call-for-helm-chart-versions.injectable";
|
|
8
|
+
declare const installChartModelInjectable: import("@ogre-tools/injectable").Injectable<Promise<InstallChartModel>, unknown, string>;
|
|
9
|
+
export default installChartModelInjectable;
|
|
10
|
+
interface Dependencies {
|
|
11
|
+
tabId: string;
|
|
12
|
+
closeTab: () => void;
|
|
13
|
+
navigateToHelmReleases: NavigateToHelmReleases;
|
|
14
|
+
waitForChart: () => Promise<void>;
|
|
15
|
+
callForCreateHelmRelease: CallForCreateHelmRelease;
|
|
16
|
+
callForHelmChartValues: CallForHelmChartValues;
|
|
17
|
+
callForHelmChartVersions: CallForHelmChartVersions;
|
|
18
|
+
store: InstallChartTabStore;
|
|
19
|
+
}
|
|
20
|
+
export declare class InstallChartModel {
|
|
21
|
+
private readonly dependencies;
|
|
22
|
+
readonly namespace: {
|
|
23
|
+
value: import("mobx").IComputedValue<string>;
|
|
24
|
+
onChange: (option: SingleValue<{
|
|
25
|
+
label: string;
|
|
26
|
+
value: string;
|
|
27
|
+
}>) => void;
|
|
28
|
+
};
|
|
29
|
+
readonly customName: {
|
|
30
|
+
value: import("mobx").IComputedValue<string>;
|
|
31
|
+
onChange: (customName: string) => void;
|
|
32
|
+
};
|
|
33
|
+
private readonly versions;
|
|
34
|
+
readonly installed: import("mobx").IObservableValue<HelmReleaseUpdateDetails | undefined>;
|
|
35
|
+
private save;
|
|
36
|
+
readonly version: {
|
|
37
|
+
value: import("mobx").IComputedValue<string>;
|
|
38
|
+
onChange: (version: string | undefined) => Promise<void>;
|
|
39
|
+
options: import("mobx").IComputedValue<{
|
|
40
|
+
label: string;
|
|
41
|
+
value: string;
|
|
42
|
+
}[]>;
|
|
43
|
+
};
|
|
44
|
+
readonly configuration: {
|
|
45
|
+
value: import("mobx").IComputedValue<string>;
|
|
46
|
+
isLoading: import("mobx").IObservableValue<boolean>;
|
|
47
|
+
onChange: (configuration: string) => void;
|
|
48
|
+
};
|
|
49
|
+
readonly errorInConfiguration: {
|
|
50
|
+
value: import("mobx").IObservableValue<string | undefined>;
|
|
51
|
+
onChange: (error: unknown) => void;
|
|
52
|
+
};
|
|
53
|
+
readonly executionOutput: {
|
|
54
|
+
isShown: import("mobx").IObservableValue<boolean>;
|
|
55
|
+
show: () => void;
|
|
56
|
+
close: () => void;
|
|
57
|
+
};
|
|
58
|
+
constructor(dependencies: Dependencies);
|
|
59
|
+
private get chart();
|
|
60
|
+
load: () => Promise<void>;
|
|
61
|
+
get isValid(): boolean;
|
|
62
|
+
get chartName(): string;
|
|
63
|
+
private get name();
|
|
64
|
+
private get repository();
|
|
65
|
+
install: () => Promise<JSX.Element>;
|
|
66
|
+
navigateToInstalledRelease: () => void;
|
|
67
|
+
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
3
3
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
4
|
*/
|
|
5
|
-
import type { TabId } from "../dock/store";
|
|
6
5
|
import type { DockTabStoreDependencies } from "../dock-tab-store/dock-tab.store";
|
|
7
6
|
import { DockTabStore } from "../dock-tab-store/dock-tab.store";
|
|
8
7
|
import type { HelmReleaseUpdateDetails } from "../../../../common/k8s-api/endpoints/helm-releases.api";
|
|
@@ -25,7 +24,4 @@ export declare class InstallChartTabStore extends DockTabStore<IChartInstallData
|
|
|
25
24
|
constructor(dependencies: InstallChartTabStoreDependencies);
|
|
26
25
|
get versions(): DockTabStore<string[]>;
|
|
27
26
|
get details(): DockTabStore<HelmReleaseUpdateDetails>;
|
|
28
|
-
loadData(tabId: string): Promise<void>;
|
|
29
|
-
private loadVersions;
|
|
30
|
-
loadValues(tabId: TabId, attempt?: number): Promise<void>;
|
|
31
27
|
}
|
|
@@ -14,6 +14,7 @@ export interface TableRowProps<Item> extends React.DOMAttributes<HTMLDivElement>
|
|
|
14
14
|
sortItem?: Item;
|
|
15
15
|
searchItem?: Item;
|
|
16
16
|
disabled?: boolean;
|
|
17
|
+
testId?: string;
|
|
17
18
|
}
|
|
18
19
|
export declare class TableRow<Item> extends React.Component<TableRowProps<Item>> {
|
|
19
20
|
render(): JSX.Element;
|
|
@@ -8,6 +8,7 @@ import type { KubeResource } from "../../../common/rbac";
|
|
|
8
8
|
import type { DiContainer } from "@ogre-tools/injectable";
|
|
9
9
|
import type { MenuItemOpts } from "../../../main/menu/application-menu-items.injectable";
|
|
10
10
|
import type { MenuItemConstructorOptions } from "electron";
|
|
11
|
+
import type { NavigateToHelmCharts } from "../../../common/front-end-routing/routes/cluster/helm/charts/navigate-to-helm-charts.injectable";
|
|
11
12
|
import type { MinimalTrayMenuItem } from "../../../main/tray/electron-tray/electron-tray.injectable";
|
|
12
13
|
import type { Route } from "../../../common/front-end-routing/front-end-route-injection-token";
|
|
13
14
|
import type { NavigateToRouteOptions } from "../../../common/front-end-routing/navigate-to-route-injection-token";
|
|
@@ -57,11 +58,14 @@ export interface ApplicationBuilder {
|
|
|
57
58
|
};
|
|
58
59
|
};
|
|
59
60
|
helmCharts: {
|
|
60
|
-
navigate:
|
|
61
|
+
navigate: NavigateToHelmCharts;
|
|
61
62
|
};
|
|
62
63
|
select: {
|
|
63
|
-
openMenu: (id: string) =>
|
|
64
|
+
openMenu: (id: string) => ({
|
|
65
|
+
selectOption: (labelText: string) => void;
|
|
66
|
+
});
|
|
64
67
|
selectOption: (menuId: string, labelText: string) => void;
|
|
68
|
+
getValue: (menuId: string) => string;
|
|
65
69
|
};
|
|
66
70
|
}
|
|
67
71
|
interface DiContainers {
|
|
@@ -18,10 +18,11 @@ interface Dependencies {
|
|
|
18
18
|
writeJsonFile: (filePath: string, contentObject: JsonObject) => Promise<void>;
|
|
19
19
|
getAbsolutePath: GetAbsolutePath;
|
|
20
20
|
hostedClusterId: string | undefined;
|
|
21
|
+
saveDelay: number;
|
|
21
22
|
}
|
|
22
23
|
export declare type CreateStorage = <T>(key: string, defaultValue: T) => StorageLayer<T>;
|
|
23
24
|
/**
|
|
24
25
|
* Creates a helper for saving data under the "key" intended for window.localStorage
|
|
25
26
|
*/
|
|
26
|
-
export declare const createStorage: ({ storage, getAbsolutePath, logger, directoryForLensLocalStorage, readJsonFile, writeJsonFile, hostedClusterId, }: Dependencies) => CreateStorage;
|
|
27
|
+
export declare const createStorage: ({ storage, getAbsolutePath, logger, directoryForLensLocalStorage, readJsonFile, writeJsonFile, hostedClusterId, saveDelay, }: Dependencies) => CreateStorage;
|
|
27
28
|
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
3
|
+
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
4
|
+
*/
|
|
5
|
+
import type { DiContainer } from "@ogre-tools/injectable";
|
|
6
|
+
export declare const controlWhenStoragesAreReady: (di: DiContainer) => () => Promise<undefined>;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@k8slens/extensions",
|
|
3
3
|
"productName": "OpenLens extensions",
|
|
4
4
|
"description": "OpenLens - Open Source Kubernetes IDE: extensions",
|
|
5
|
-
"version": "5.6.0-git.
|
|
5
|
+
"version": "5.6.0-git.f7f41cab79.0",
|
|
6
6
|
"copyright": "© 2022 OpenLens Authors",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "dist/src/extensions/extension-api.js",
|