mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-30 13:54:01 +00:00
18 lines
396 B
JavaScript
Executable File
18 lines
396 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
const { spawn } = require("child_process")
|
|
const path = require("path")
|
|
|
|
const scriptDir = __dirname
|
|
const srcPath = path.join(scriptDir, "..", "src", "index.ts")
|
|
|
|
const child = spawn("npx", ["tsx", srcPath, ...process.argv.slice(2)], {
|
|
stdio: "inherit",
|
|
shell: process.platform === "win32",
|
|
cwd: scriptDir
|
|
})
|
|
|
|
child.on("exit", (code) => {
|
|
process.exit(code || 0)
|
|
})
|