@hermenics/deepseek-code 0.7.6 → 0.7.7

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/deepseek.mjs CHANGED
@@ -15,15 +15,17 @@ if (major < MIN_BUN[0] || (major === MIN_BUN[0] && minor < MIN_BUN[1])) {
15
15
  process.exit(1)
16
16
  }
17
17
 
18
- // Restore the terminal even when the app dies without running its own cleanup.
19
- // (SIGKILL cannot be intercepted on any platform — bash traps could not either.)
18
+ // Restore the terminal on every exit path, even when the app dies without
19
+ // running its own cleanup. (SIGKILL cannot be intercepted on any platform.)
20
+ // No signal listeners here: registering one cancels the signal's default exit,
21
+ // so a SIGHUP/SIGTERM would only restore and leave the process running forever.
22
+ // The app itself turns SIGINT/SIGTERM/SIGHUP into a clean exit.
20
23
  const restore = () => {
21
- if (process.stdout.isTTY) process.stdout.write('\u001b[?1000l\u001b[?1002l\u001b[?1003l\u001b[?25h')
24
+ // The terminal may already be gone (EIO); exiting must not fail on it.
25
+ try {
26
+ if (process.stdout.isTTY) process.stdout.write('\u001b[?1000l\u001b[?1002l\u001b[?1003l\u001b[?25h')
27
+ } catch {}
22
28
  }
23
29
  process.on('exit', restore)
24
- for (const signal of ['SIGINT', 'SIGTERM', 'SIGHUP']) {
25
- // Windows raises SIGINT/SIGTERM only in limited cases; registering is harmless.
26
- try { process.on(signal, restore) } catch {}
27
- }
28
30
 
29
31
  await import(join(dirname(fileURLToPath(import.meta.url)), 'cli.mjs'))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hermenics/deepseek-code",
3
- "version": "0.7.6",
3
+ "version": "0.7.7",
4
4
  "description": "An AI-powered coding assistant that lives in your terminal",
5
5
  "keywords": [
6
6
  "ai",