mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-18 03:30:39 +09:00
Fix worktree runtime isolation recovery
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
c74cda1851
commit
ab82e3f022
8 changed files with 715 additions and 2 deletions
21
server/src/dev-watch-ignore.ts
Normal file
21
server/src/dev-watch-ignore.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
|
||||
function addIgnorePath(target: Set<string>, candidate: string): void {
|
||||
target.add(candidate);
|
||||
try {
|
||||
target.add(fs.realpathSync(candidate));
|
||||
} catch {
|
||||
// Ignore paths that do not exist in the current checkout.
|
||||
}
|
||||
}
|
||||
|
||||
export function resolveServerDevWatchIgnorePaths(serverRoot: string): string[] {
|
||||
const ignorePaths = new Set<string>();
|
||||
|
||||
for (const relativePath of ["../ui/node_modules", "../ui/.vite", "../ui/dist"]) {
|
||||
addIgnorePath(ignorePaths, path.resolve(serverRoot, relativePath));
|
||||
}
|
||||
|
||||
return [...ignorePaths];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue