(dir)
| 94 | // node/lib/bin layout as the npm platform package). Returns {command, args} or |
| 95 | // null when the directory doesn't hold a usable bundle yet. |
| 96 | function launcherIn(dir) { |
| 97 | if (isWindows) { |
| 98 | var nodeExe = path.join(dir, 'node.exe'); |
| 99 | var entry = path.join(dir, 'lib', 'dist', 'bin', 'codegraph.js'); |
| 100 | if (fs.existsSync(nodeExe) && fs.existsSync(entry)) { |
| 101 | return { command: nodeExe, args: liftoff(entry) }; |
| 102 | } |
| 103 | } else { |
| 104 | var launcher = path.join(dir, 'bin', 'codegraph'); |
| 105 | if (fs.existsSync(launcher)) return { command: launcher, args: process.argv.slice(2) }; |
| 106 | } |
| 107 | return null; |
| 108 | } |
| 109 | |
| 110 | // --liftoff-only keeps tree-sitter's WASM grammars off V8's turboshaft tier to |
| 111 | // avoid the Zone OOM on Node >= 22 (issues #293/#298). The unix bin/codegraph |
no test coverage detected