@tarcisiopgs/lisa 1.22.0 → 1.22.2

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.
Files changed (2) hide show
  1. package/dist/index.js +6 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -545,16 +545,19 @@ function startOverseer(proc, cwd, config2, getSnapshot = getGitSnapshot) {
545
545
  import { spawn } from "child_process";
546
546
  import { platform } from "os";
547
547
  var ANSI_REGEX = /\x1b(?:\[[0-9;?]*[a-zA-Z]|\][^\x07]*\x07|\([A-Z0-9]|[A-Z])/g;
548
+ var CTRL_D_REGEX = /\x04/g;
549
+ var CARET_D_BACKSPACE_REGEX = /\^D\x08\x08/g;
548
550
  function stripAnsi(text2) {
549
- return text2.replace(ANSI_REGEX, "").replace(/\r\n/g, "\n").replace(/\r/g, "");
551
+ return text2.replace(ANSI_REGEX, "").replace(CTRL_D_REGEX, "").replace(CARET_D_BACKSPACE_REGEX, "").replace(/\r\n/g, "\n").replace(/\r/g, "");
550
552
  }
551
553
  function buildPtyArgs(command, os) {
552
554
  const currentOs = os ?? platform();
555
+ const wrappedCommand = `stty eof undef 2>/dev/null; ${command} < /dev/null`;
553
556
  if (currentOs === "darwin") {
554
- return { file: "script", args: ["-qF", "/dev/null", "sh", "-c", command] };
557
+ return { file: "script", args: ["-qF", "/dev/null", "sh", "-c", wrappedCommand] };
555
558
  }
556
559
  if (currentOs === "linux") {
557
- return { file: "script", args: ["-qef", "-c", command, "/dev/null"] };
560
+ return { file: "script", args: ["-qef", "-c", wrappedCommand, "/dev/null"] };
558
561
  }
559
562
  return null;
560
563
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarcisiopgs/lisa",
3
- "version": "1.22.0",
3
+ "version": "1.22.2",
4
4
  "description": "Autonomous issue resolver",
5
5
  "keywords": [
6
6
  "loop",