chore: Fix type errors and update lockfile after rebase

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2023-06-01 09:27:46 -04:00
1 parent 81cf4f158c
commit 645e274d72
6 files changed
+69 -33

No files matched your search

@@ -23,7 +23,13 @@ const handleListHelmReleasesInjectable = getRequestChannelListenerInjectable({
return result.error(`Cluster with id "${clusterId}" not found`);
}
return listClusterHelmReleases(cluster, namespace);
const listResult = await listClusterHelmReleases(cluster, namespace);
if (listResult.isOk) {
return listResult;
}
return result.error(`Failed to list helm releases: ${listResult.error.message}`);
};
},
});
+2 -2
View File
@@ -10,7 +10,7 @@ import glob from "glob";
import path from "path";
import { enableMapSet, setAutoFreeze } from "immer";
import React from "react";
import { isObject } from "@k8slens/utilities";
import { isReactNode } from "@k8slens/utilities";
import type { TooltipDecoratorProps } from "@k8slens/tooltip";
declare global {
@@ -71,7 +71,7 @@ jest.mock("@k8slens/tooltip", () => ({
<>
<ResolvedTarget {...props as (TargetProps & { children?: React.ReactNode })} />
<div data-testid={testId && `tooltip-content-for-${testId}`}>
{isObject(tooltip) ? tooltip.children : tooltip}
{isReactNode(tooltip) ? tooltip : tooltip.children}
</div>
</>
);
@@ -10,7 +10,7 @@ import listHelmReleasesInjectable from "../list-helm-releases.injectable";
import type { AsyncResult } from "@k8slens/utilities";
import type { ListedHelmRelease } from "../../../features/helm-releases/common/channels";
export type ListClusterHelmReleases = (cluster: Cluster, namespace?: string) => AsyncResult<ListedHelmRelease[], string>;
export type ListClusterHelmReleases = (cluster: Cluster, namespace?: string) => AsyncResult<ListedHelmRelease[], Error>;
const listClusterHelmReleasesInjectable = getInjectable({
id: "list-cluster-helm-releases",
@@ -5,7 +5,6 @@
import { getInjectable } from "@ogre-tools/injectable";
import httpProxy from "http-proxy";
import path from "path";
import { webpackDevServerPort } from "../../../../webpack/vars";
import type { LensApiRequest, RouteResponse } from "../../router/route";
export const webpackDevServerPort = Number(process.env.WEBPACK_DEV_SERVER_PORT) || 9191;
@@ -155,7 +155,7 @@ class NonInjectedConfirmDialog extends React.Component<ConfirmDialogProps & Depe
primary
className="ok"
label={labelOk}
onClick={prevDefault(this.ok)}
onClick={prevDefault(() => void this.ok())}
waiting={this.isSaving}
data-testid="confirm"
{...okButtonProps}