@hackwaly/task 0.2.2 → 0.2.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hackwaly/task",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": "github:hackwaly/task",
package/src/cli.ts CHANGED
@@ -97,6 +97,11 @@ export async function cliMain(): Promise<void> {
97
97
  });
98
98
  taskChan.next(topTaskSet);
99
99
  } else {
100
+ process.on("SIGINT", async () => {
101
+ aborter.abort();
102
+ await loop;
103
+ process.exit(0);
104
+ });
100
105
  taskChan.next(topTaskSet);
101
106
  taskChan.complete();
102
107
  }
package/src/run.ts CHANGED
@@ -18,7 +18,7 @@ export async function runCommand(
18
18
  const lastCR = line.lastIndexOf("\r");
19
19
  const line2 = lastCR >= 0 ? line.substring(lastCR + 1, line.length) : line;
20
20
  const line3 = line2.replace(/\x1bc|\x1b\[2J(?:\x1b\[H)?/g, "");
21
- yield `${name} | ${line3}`;
21
+ yield `\r${name} | ${line3}`;
22
22
  };
23
23
 
24
24
  process.stdout.write(`▪▪▪▪ ${styles.bold.open}${name}${styles.bold.close}\n`);