@particle-academy/fancy-term-host 0.2.0 → 0.2.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.
- package/dist/index.cjs +19 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -2
- package/dist/index.js.map +1 -1
- package/dist/pty-host.cjs +1 -1
- package/dist/pty-host.cjs.map +1 -1
- package/dist/pty-host.js +1 -1
- package/dist/pty-host.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -371,14 +371,31 @@ var InProcessBackend = class extends events.EventEmitter {
|
|
|
371
371
|
};
|
|
372
372
|
env.TERM = env.TERM || "xterm-256color";
|
|
373
373
|
const pty = nodePty.spawn(shell, args, {
|
|
374
|
-
name:
|
|
374
|
+
name: env.TERM,
|
|
375
375
|
// Native-convert + validate the requested dir; a stale/foreign/MSYS
|
|
376
376
|
// cwd (e.g. Git Bash's /c/Users/me) would otherwise crash spawn with
|
|
377
377
|
// Windows ERROR_DIRECTORY (267). Falls back to home if unusable.
|
|
378
378
|
cwd: resolveSpawnCwd(opts.cwd),
|
|
379
379
|
cols: opts.cols ?? 80,
|
|
380
380
|
rows: opts.rows ?? 24,
|
|
381
|
-
env
|
|
381
|
+
env,
|
|
382
|
+
// Use node-pty's bundled MODERN ConPTY (conpty.dll + its own
|
|
383
|
+
// OpenConsole) instead of the legacy in-box conhost path. Windows-only;
|
|
384
|
+
// ignored elsewhere. This matters specifically for the DETACHED pty-host
|
|
385
|
+
// (genie-adapter spawnDetached: a windowless `detached` standalone
|
|
386
|
+
// node.exe with no console of its own):
|
|
387
|
+
// • Legacy ConPTY, lacking a host console, allocates a NEW VISIBLE
|
|
388
|
+
// console per shell → on Win11 (default terminal = Windows Terminal)
|
|
389
|
+
// that surfaces as a stray WindowsTerminal window. conpty.dll does
|
|
390
|
+
// not pop a window for a console-less host.
|
|
391
|
+
// • The legacy KILL path forks `conpty_console_list_agent` UN-hidden
|
|
392
|
+
// to enumerate the console process list; under the windowless host
|
|
393
|
+
// that fork both flashes a console AND crashes with
|
|
394
|
+
// "AttachConsole failed". The conpty.dll kill path takes neither
|
|
395
|
+
// fork, so the crash + flash are gone.
|
|
396
|
+
// Verified deterministically: with this on, kill() spawns no agent and
|
|
397
|
+
// throws nothing; off, every kill forks the agent and it crashes.
|
|
398
|
+
useConptyDll: true
|
|
382
399
|
});
|
|
383
400
|
this.ptys.set(opts.id, pty);
|
|
384
401
|
this.shells.set(opts.id, shell);
|