diff --git a/entrypoint.sh b/entrypoint.sh index 01e9b36..dafaa30 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -4,8 +4,8 @@ set -e echo "[entrypoint] Starting monitor-ai..." -# 启动 MonitorWorker(后台,tsx 即时执行 TypeScript) -npx tsx scripts/monitor-worker.ts & +# 启动 MonitorWorker(后台,tsx + tsconfig-paths 解析路径别名) +npx tsx -r tsconfig-paths/register scripts/monitor-worker.ts & WORKER_PID=$! # 启动 Next.js standalone server diff --git a/package-lock.json b/package-lock.json index 0fbb705..aec85c1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "react": "^19.0.0", "react-dom": "^19.0.0", "tailwindcss": "^4.3.2", + "tsconfig-paths": "^4.2.0", "tsx": "^4.0.0" }, "devDependencies": { @@ -1767,6 +1768,18 @@ "url": "https://github.com/sponsors/panva" } }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/ldapts": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/ldapts/-/ldapts-6.0.0.tgz", @@ -2076,6 +2089,15 @@ "@jridgewell/sourcemap-codec": "^1.5.5" } }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -2368,6 +2390,15 @@ "integrity": "sha512-Nk/brWYpD85WlOgzw5h173aci0Teyv8YdIAEtV+N88nDB0dLlazZyJMIsN6eo1/AR61l+p6CJTG1JIyFaoNEEA==", "license": "ISC" }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/styled-jsx": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.6.tgz", @@ -2410,6 +2441,20 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/tsconfig-paths": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", + "integrity": "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==", + "license": "MIT", + "dependencies": { + "json5": "^2.2.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", diff --git a/package.json b/package.json index b34f3ae..5464c58 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "react": "^19.0.0", "react-dom": "^19.0.0", "tailwindcss": "^4.3.2", + "tsconfig-paths": "^4.2.0", "tsx": "^4.0.0" }, "devDependencies": {