tasktui 1.0.22 → 1.0.24

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.
@@ -1,3 +1,4 @@
1
1
  declare const CONFIG_PATH = "./tasktui.config.json";
2
2
  declare const KEYBINDS: string[];
3
- export { CONFIG_PATH, KEYBINDS };
3
+ declare const CLEANUP_TIMEOUT = 10000;
4
+ export { CLEANUP_TIMEOUT, CONFIG_PATH, KEYBINDS };
package/dist/constants.js CHANGED
@@ -5,4 +5,5 @@ const KEYBINDS = [
5
5
  '↓ or j - Select next task',
6
6
  'Ctrl-c or q - Quit',
7
7
  ];
8
- export { CONFIG_PATH, KEYBINDS };
8
+ const CLEANUP_TIMEOUT = 10000;
9
+ export { CLEANUP_TIMEOUT, CONFIG_PATH, KEYBINDS };
package/dist/tasks.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import childProcess from 'node:child_process';
2
+ import { CLEANUP_TIMEOUT } from './constants.js';
2
3
  import { showError } from './renderer.js';
3
4
  import { ensureError } from './utils.js';
4
5
  export function ensureDependencies(task, deps, state) {
@@ -88,9 +89,9 @@ export async function cleanup(state) {
88
89
  return;
89
90
  const exitPromises = processes.map(([_, proc]) => new Promise((resolve) => {
90
91
  proc.on('close', resolve);
91
- proc.kill('SIGTERM');
92
+ proc.kill('SIGINT');
92
93
  }));
93
- const timeout = new Promise((resolve) => setTimeout(() => resolve('timeout'), 5000));
94
+ const timeout = new Promise((resolve) => setTimeout(() => resolve('timeout'), CLEANUP_TIMEOUT));
94
95
  const result = await Promise.race([
95
96
  Promise.all(exitPromises).then(() => 'done'),
96
97
  timeout,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tasktui",
3
3
  "description": "Run tasks in a multiplexed terminal with dependency management.",
4
- "version": "1.0.22",
4
+ "version": "1.0.24",
5
5
  "license": "MIT",
6
6
  "bin": "dist/cli.js",
7
7
  "type": "module",