Showing the changes to apps/server/src/workspace/WorkspaceFileSystem.ts (1 of 71 files). Show all
Unified · Split
| @@ -7,7 +7,7 @@ · 6 unmodified lines | |||
| 7 | * | 7 | * |
| 8 | * @module WorkspaceFileSystem | 8 | * @module WorkspaceFileSystem |
| 9 | */ | 9 | */ |
| 10 | import { open, realpath } from "node:fs/promises"; | 10 | import * as NodeFSP from "node:fs/promises"; |
| 11 | 11 | ||
| 12 | import type { | 12 | import type { |
| 13 | ProjectReadFileInput, | 13 | ProjectReadFileInput, |
| @@ -89,8 +89,8 @@ export const make = Effect.gen(function* () { · 75 unmodified lines | |||
| 89 | return yield* Effect.tryPromise({ | 89 | return yield* Effect.tryPromise({ |
| 90 | try: async () => { | 90 | try: async () => { |
| 91 | const [realWorkspaceRoot, realTargetPath] = await Promise.all([ | 91 | const [realWorkspaceRoot, realTargetPath] = await Promise.all([ |
| 92 | realpath(input.cwd), | 92 | NodeFSP.realpath(input.cwd), |
| 93 | realpath(target.absolutePath), | 93 | NodeFSP.realpath(target.absolutePath), |
| 94 | ]); | 94 | ]); |
| 95 | const relativeRealPath = path.relative(realWorkspaceRoot, realTargetPath); | 95 | const relativeRealPath = path.relative(realWorkspaceRoot, realTargetPath); |
| 96 | if ( | 96 | if ( |
| @@ -101,7 +101,7 @@ export const make = Effect.gen(function* () { · 4 unmodified lines | |||
| 101 | throw new Error("Workspace file path resolves outside the project root."); | 101 | throw new Error("Workspace file path resolves outside the project root."); |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | const handle = await open(realTargetPath, "r"); | 104 | const handle = await NodeFSP.open(realTargetPath, "r"); |
| 105 | try { | 105 | try { |
| 106 | const stat = await handle.stat(); | 106 | const stat = await handle.stat(); |
| 107 | if (!stat.isFile()) { | 107 | if (!stat.isFile()) { |