MCPcopy Index your code
hub / github.com/NativeScript/SimDeck / runNodeScript

Function runNodeScript

scripts/integration/webrtc.mjs:326–341  ·  view source on GitHub ↗
(script, args, env)

Source from the content-addressed store, hash-verified

324}
325
326function runNodeScript(script, args, env) {
327 const result = spawnSync(
328 process.execPath,
329 [path.join(root, script), ...args],
330 {
331 cwd: root,
332 encoding: "utf8",
333 env: { ...process.env, ...env },
334 stdio: "inherit",
335 timeout: 300_000,
336 },
337 );
338 if (result.status !== 0) {
339 throw new Error(`${script} failed with ${result.status}`);
340 }
341}
342
343function httpJson(pathname) {
344 return new Promise((resolve, reject) => {

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected