From 3fbbf022b93d705133368de08d7f407737bf445f Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Fri, 16 Dec 2022 11:14:17 -0500 Subject: [PATCH] Fix errors blocking compilation Signed-off-by: Sebastian Malton --- src/common/fs/fs.injectable.ts | 6 ++++++ .../file-system-provisioner-store.ts | 2 +- src/features/cluster/state-sync/common/channels.ts | 2 +- src/features/path-picking-dialog/common/channel.ts | 2 +- src/features/theme/system-type/common/channels.ts | 2 +- src/test-utils/override-fs-with-fakes.ts | 3 +++ yarn.lock | 2 +- 7 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/common/fs/fs.injectable.ts b/src/common/fs/fs.injectable.ts index f80375095c..b1a3d7ed55 100644 --- a/src/common/fs/fs.injectable.ts +++ b/src/common/fs/fs.injectable.ts @@ -21,6 +21,8 @@ const fsInjectable = getInjectable({ rm, access, stat, + chmod, + copyFile, }, ensureDir, ensureDirSync, @@ -34,6 +36,7 @@ const fsInjectable = getInjectable({ pathExists, copy, createReadStream, + createWriteStream, } = fse; return { @@ -56,6 +59,9 @@ const fsInjectable = getInjectable({ ensureDirSync, createReadStream, stat, + chmod, + copyFile, + createWriteStream, }; }, causesSideEffects: true, diff --git a/src/extensions/extension-loader/file-system-provisioner-store/file-system-provisioner-store.ts b/src/extensions/extension-loader/file-system-provisioner-store/file-system-provisioner-store.ts index 5655a0cf06..f06c59c755 100644 --- a/src/extensions/extension-loader/file-system-provisioner-store/file-system-provisioner-store.ts +++ b/src/extensions/extension-loader/file-system-provisioner-store/file-system-provisioner-store.ts @@ -9,7 +9,7 @@ import type { BaseStoreDependencies } from "../../../common/base-store/base-stor import { BaseStore } from "../../../common/base-store/base-store"; import type { LensExtensionId } from "../../lens-extension"; import { getOrInsertWithAsync, toJS } from "../../../common/utils"; -import type { EnsureDirectory } from "../../../common/fs/ensure-dir.injectable"; +import type { EnsureDirectory } from "../../../common/fs/ensure-directory.injectable"; import type { JoinPaths } from "../../../common/path/join-paths.injectable"; import type { RandomBytes } from "../../../common/utils/random-bytes.injectable"; diff --git a/src/features/cluster/state-sync/common/channels.ts b/src/features/cluster/state-sync/common/channels.ts index 7ceeb82f84..8c2fb2d2f9 100644 --- a/src/features/cluster/state-sync/common/channels.ts +++ b/src/features/cluster/state-sync/common/channels.ts @@ -5,7 +5,7 @@ import type { ClusterId, ClusterState } from "../../../../common/cluster-types"; import type { MessageChannel } from "../../../../common/utils/channel/message-channel-listener-injection-token"; -import type { RequestChannel } from "../../../../common/utils/channel/request-channel-listener-injection-token"; +import type { RequestChannel } from "../../../../common/utils/channel/request-channel"; export interface ClusterStateSync { clusterId: ClusterId; diff --git a/src/features/path-picking-dialog/common/channel.ts b/src/features/path-picking-dialog/common/channel.ts index 98c19b4ad6..2fb6d00ff9 100644 --- a/src/features/path-picking-dialog/common/channel.ts +++ b/src/features/path-picking-dialog/common/channel.ts @@ -4,7 +4,7 @@ */ import type { OpenDialogOptions } from "electron"; -import type { RequestChannel } from "../../../common/utils/channel/request-channel-listener-injection-token"; +import type { RequestChannel } from "../../../common/utils/channel/request-channel"; export type PathPickingResponse = { canceled: true; diff --git a/src/features/theme/system-type/common/channels.ts b/src/features/theme/system-type/common/channels.ts index 3134f20378..5d37fa2d2e 100644 --- a/src/features/theme/system-type/common/channels.ts +++ b/src/features/theme/system-type/common/channels.ts @@ -4,7 +4,7 @@ */ import type { MessageChannel } from "../../../../common/utils/channel/message-channel-listener-injection-token"; -import type { RequestChannel } from "../../../../common/utils/channel/request-channel-listener-injection-token"; +import type { RequestChannel } from "../../../../common/utils/channel/request-channel"; export type SystemThemeType = "dark" | "light"; diff --git a/src/test-utils/override-fs-with-fakes.ts b/src/test-utils/override-fs-with-fakes.ts index 734170b0c7..f5f4c906e2 100644 --- a/src/test-utils/override-fs-with-fakes.ts +++ b/src/test-utils/override-fs-with-fakes.ts @@ -62,6 +62,9 @@ export const getOverrideFsWithFakes = () => { ensureDirSync, createReadStream: root.createReadStream as any, stat: root.promises.stat as any, + chmod: root.promises.chmod, + copyFile: root.promises.copyFile, + createWriteStream: root.createWriteStream as any, })); }; }; diff --git a/yarn.lock b/yarn.lock index 0d1bb0621b..2e408c9982 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2749,7 +2749,7 @@ dependencies: "@types/node" "*" -"@types/ws@^8.5.1": +"@types/ws@^8.5.1", "@types/ws@^8.5.3": version "8.5.3" resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.3.tgz#7d25a1ffbecd3c4f2d35068d0b283c037003274d" integrity sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==