@danielx/civet 0.8.4 → 0.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/civet CHANGED
@@ -90,7 +90,7 @@ async function parseArgs(args, isTTY = process.stdin.isTTY) {
90
90
  results.push(`-${char}`);
91
91
  }
92
92
  ;
93
- args.splice(i, 1 + i - i, ...results);
93
+ args.splice(i, i + 1 - i, ...results);
94
94
  continue;
95
95
  }
96
96
  switch (arg) {
@@ -248,7 +248,6 @@ async function* readFiles(filenames, evalString) {
248
248
  stdin: true
249
249
  };
250
250
  }
251
- const results1 = [];
252
251
  for (let i2 = 0, len1 = filenames.length; i2 < len1; i2++) {
253
252
  let filename = filenames[i2];
254
253
  const stdin = filename === "-";
@@ -275,23 +274,21 @@ async function* readFiles(filenames, evalString) {
275
274
  });
276
275
  } else {
277
276
  content = (await (async () => {
278
- const results2 = [];
277
+ const results1 = [];
279
278
  for await (const chunk of process.stdin) {
280
- results2.push(chunk);
279
+ results1.push(chunk);
281
280
  }
282
- return results2;
281
+ return results1;
283
282
  })()).join("");
284
283
  }
285
284
  } else {
286
285
  content = await import_promises.default.readFile(filename, { encoding });
287
286
  }
288
- results1.push(yield { filename, content, stdin });
287
+ yield { filename, content, stdin };
289
288
  } catch (error) {
290
- results1.push(yield { filename, error, stdin });
289
+ yield { filename, error, stdin };
291
290
  }
292
291
  }
293
- ;
294
- return results1;
295
292
  }
296
293
  async function repl(args, options) {
297
294
  const vm = await import("node:vm");
@@ -308,9 +305,6 @@ async function repl(args, options) {
308
305
  };
309
306
  } else {
310
307
  const execArgv = ["--experimental-vm-modules"];
311
- if (process.env.NODE_OPTIONS) {
312
- execArgv.push(process.env.NODE_OPTIONS);
313
- }
314
308
  const { fork } = await import("node:child_process");
315
309
  fork(__filename, args, {
316
310
  execArgv,
@@ -653,9 +647,6 @@ You can override this behavior via: --civet rewriteCivetImports=.ext
653
647
  }
654
648
  const debugRe = /--debug|--inspect/;
655
649
  const isDebug = typeof v8debug === "object" || debugRe.test(process.execArgv.join(" ")) || debugRe.test(process.env.NODE_OPTIONS ?? "");
656
- if (process.env.NODE_OPTIONS) {
657
- execArgv.push(process.env.NODE_OPTIONS);
658
- }
659
650
  if (isDebug) {
660
651
  execArgv.push("--inspect=" + (process.debugPort + 1));
661
652
  }