MCPcopy Index your code
hub / github.com/colbymchenry/codegraph / launcherIn

Function launcherIn

scripts/npm-shim.js:77–89  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

75// node/lib/bin layout as the npm platform package). Returns {command, args} or
76// null when the directory doesn't hold a usable bundle yet.
77function launcherIn(dir) {
78 if (isWindows) {
79 var nodeExe = path.join(dir, 'node.exe');
80 var entry = path.join(dir, 'lib', 'dist', 'bin', 'codegraph.js');
81 if (fs.existsSync(nodeExe) && fs.existsSync(entry)) {
82 return { command: nodeExe, args: liftoff(entry) };
83 }
84 } else {
85 var launcher = path.join(dir, 'bin', 'codegraph');
86 if (fs.existsSync(launcher)) return { command: launcher, args: process.argv.slice(2) };
87 }
88 return null;
89}
90
91// --liftoff-only keeps tree-sitter's WASM grammars off V8's turboshaft tier to
92// avoid the Zone OOM on Node >= 22 (issues #293/#298). The unix bin/codegraph

Callers 1

selfHealBundleFunction · 0.85

Calls 2

liftoffFunction · 0.85
joinMethod · 0.80

Tested by

no test coverage detected