mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
chore: Fix type errors
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
8991e5daa1
commit
f21e42d7e7
@ -45,7 +45,7 @@ const NonInjectedAddingOfPublicHelmRepository = observer(({
|
|||||||
isLoading={valuesAreLoading}
|
isLoading={valuesAreLoading}
|
||||||
isDisabled={valuesAreLoading}
|
isDisabled={valuesAreLoading}
|
||||||
options={repositoryOptions}
|
options={repositoryOptions}
|
||||||
onChange={(...args) => void selectRepository(...args)}
|
onChange={(value) => void selectRepository(value)}
|
||||||
value={dereferencesPublicRepositories}
|
value={dereferencesPublicRepositories}
|
||||||
formatOptionLabel={formatOptionLabel}
|
formatOptionLabel={formatOptionLabel}
|
||||||
controlShouldRenderValue={false}
|
controlShouldRenderValue={false}
|
||||||
|
|||||||
@ -12,7 +12,7 @@ const emitTelemetryInjectable = getInjectable({
|
|||||||
instantiate: (di) => {
|
instantiate: (di) => {
|
||||||
const emitEvent = di.inject(emitEventInjectable);
|
const emitEvent = di.inject(emitEventInjectable);
|
||||||
|
|
||||||
return ({ action, params }: { action: string; params?: object }) => {
|
return ({ action, params }: { action: string; params?: Record<string, unknown> }) => {
|
||||||
emitEvent({
|
emitEvent({
|
||||||
destination: "auto-capture",
|
destination: "auto-capture",
|
||||||
action: "telemetry-from-business-action",
|
action: "telemetry-from-business-action",
|
||||||
|
|||||||
@ -21,6 +21,7 @@ import createListNamespacesInjectable from "../../common/cluster/list-namespaces
|
|||||||
import prometheusHandlerInjectable from "../cluster/prometheus-handler/prometheus-handler.injectable";
|
import prometheusHandlerInjectable from "../cluster/prometheus-handler/prometheus-handler.injectable";
|
||||||
import writeJsonSyncInjectable from "../../common/fs/write-json-sync.injectable";
|
import writeJsonSyncInjectable from "../../common/fs/write-json-sync.injectable";
|
||||||
import addClusterInjectable from "../../features/cluster/storage/common/add.injectable";
|
import addClusterInjectable from "../../features/cluster/storage/common/add.injectable";
|
||||||
|
import assert from "assert";
|
||||||
|
|
||||||
describe("create clusters", () => {
|
describe("create clusters", () => {
|
||||||
let cluster: Cluster;
|
let cluster: Cluster;
|
||||||
@ -75,11 +76,15 @@ describe("create clusters", () => {
|
|||||||
|
|
||||||
const addCluster = di.inject(addClusterInjectable);
|
const addCluster = di.inject(addClusterInjectable);
|
||||||
|
|
||||||
cluster = addCluster({
|
const clusterResult = addCluster({
|
||||||
id: "foo",
|
id: "foo",
|
||||||
contextName: "minikube",
|
contextName: "minikube",
|
||||||
kubeConfigPath: "/minikube-config.yml",
|
kubeConfigPath: "/minikube-config.yml",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
assert(clusterResult.isOk);
|
||||||
|
|
||||||
|
cluster = clusterResult.value;
|
||||||
clusterConnection = di.inject(clusterConnectionInjectable, cluster);
|
clusterConnection = di.inject(clusterConnectionInjectable, cluster);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -10,12 +10,11 @@ import type { Disposer } from "@k8slens/utilities";
|
|||||||
import { iter } from "@k8slens/utilities";
|
import { iter } from "@k8slens/utilities";
|
||||||
import type { Logger } from "@k8slens/logger";
|
import type { Logger } from "@k8slens/logger";
|
||||||
import type { WatchKubeconfigFileChanges } from "./watch-file-changes.injectable";
|
import type { WatchKubeconfigFileChanges } from "./watch-file-changes.injectable";
|
||||||
import type { KubeconfigSyncValue } from "../../../features/user-preferences/common/preferences-helpers";
|
|
||||||
|
|
||||||
interface KubeconfigSyncManagerDependencies {
|
interface KubeconfigSyncManagerDependencies {
|
||||||
readonly directoryForKubeConfigs: string;
|
readonly directoryForKubeConfigs: string;
|
||||||
readonly logger: Logger;
|
readonly logger: Logger;
|
||||||
readonly kubeconfigSyncs: ObservableMap<string, KubeconfigSyncValue>;
|
readonly kubeconfigSyncs: ObservableMap<string, object>;
|
||||||
watchKubeconfigFileChanges: WatchKubeconfigFileChanges;
|
watchKubeconfigFileChanges: WatchKubeconfigFileChanges;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,7 @@ export class ShellRequestAuthenticator {
|
|||||||
const authToken = Uint8Array.from(await randomBytes(128));
|
const authToken = Uint8Array.from(await randomBytes(128));
|
||||||
const forCluster = getOrInsertMap(this.tokens, clusterId);
|
const forCluster = getOrInsertMap(this.tokens, clusterId);
|
||||||
|
|
||||||
forCluster.set(tabId, authToken);
|
forCluster.set(tabId as string, authToken);
|
||||||
|
|
||||||
return authToken;
|
return authToken;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import type React from "react";
|
|||||||
|
|
||||||
export interface WorkloadOverviewDetail {
|
export interface WorkloadOverviewDetail {
|
||||||
orderNumber: number;
|
orderNumber: number;
|
||||||
Component: React.ElementType<object>;
|
Component: React.ElementType;
|
||||||
enabled: IComputedValue<boolean>;
|
enabled: IComputedValue<boolean>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -65,8 +65,8 @@ export class PortForwardStore extends ItemStore<PortForwardItem> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
loadAll() {
|
async loadAll() {
|
||||||
return this.loadItems(() => {
|
await this.loadItems(() => {
|
||||||
const portForwards = this.getPortForwards();
|
const portForwards = this.getPortForwards();
|
||||||
|
|
||||||
this.dependencies.storage.set(portForwards);
|
this.dependencies.storage.set(portForwards);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user