1
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
2026-04-18 17:28:23 +08:00
parent b3066c7bc1
commit 54b3d3c490
21 changed files with 731 additions and 156 deletions

View File

@@ -2,7 +2,7 @@ import net from 'node:net';
import path from 'node:path';
import {spawn} from 'node:child_process';
import {existsSync, readFileSync} from 'node:fs';
import {fileURLToPath} from 'node:url';
import {fileURLToPath, pathToFileURL} from 'node:url';
const repoRoot = fileURLToPath(new URL('../', import.meta.url));
const serverRoot = fileURLToPath(new URL('../server-node/', import.meta.url));
@@ -13,6 +13,7 @@ const serverTsxCliPath = fileURLToPath(
const serverTsxLoaderPath = fileURLToPath(
new URL('../server-node/node_modules/tsx/dist/loader.mjs', import.meta.url),
);
const serverTsxLoaderUrl = pathToFileURL(serverTsxLoaderPath).href;
const envExamplePath = fileURLToPath(new URL('../.env.example', import.meta.url));
const envLocalPath = fileURLToPath(new URL('../.env.local', import.meta.url));
const bundledNodePath = fileURLToPath(
@@ -304,7 +305,7 @@ function registerChild(name, child, siblingProvider) {
}
const serverProcess = existsSync(serverTsxLoaderPath)
? spawn(runtimeNodePath, ['--watch', '--import', serverTsxLoaderPath, 'src/server.ts'], {
? spawn(runtimeNodePath, ['--watch', '--import', serverTsxLoaderUrl, 'src/server.ts'], {
cwd: serverRoot,
env: mergedEnv,
stdio: 'inherit',