fix: replace ts-node with tsx for worker scripts

TypeScript 7's CommonJS export no longer populates ts.sys, which
ts-node's config loader depends on, breaking `npm run worker` with
a TypeError. tsx (esbuild-based) doesn't rely on that API and
natively resolves tsconfig.json path aliases, so tsconfig-paths is
also no longer needed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-11 14:22:46 +02:00
co-authored by Claude Sonnet 5
parent 27ba48d181
commit 837dc954c2
5 changed files with 511 additions and 225 deletions
+2 -6
View File
@@ -22,12 +22,8 @@ if (existsSync(PID_FILE)) {
}
const child = spawn(
'node',
[
'-r', 'ts-node/register',
'-r', 'tsconfig-paths/register',
path.join(__dirname, 'index.ts'),
],
process.execPath,
[require.resolve('tsx/cli'), path.join(__dirname, 'index.ts')],
{ detached: true, stdio: 'ignore' }
)
child.unref()