vibetunnel/web/package/node-pty
Peter Steinberger 84b7467e83 fix: handle authenticate-pam as optional dependency in npm package
- Modified postinstall script to extract authenticate-pam prebuilds when npm skips optional deps
- Updated authenticate-pam-loader to load from optional-modules directory
- Prepared beta.12 release with all fixes consolidated
- Moved Docker test script to scripts folder
- Updated documentation in npm.md
2025-07-17 09:32:42 +02:00
..
lib fix: handle authenticate-pam as optional dependency in npm package 2025-07-17 09:32:42 +02:00
src fix: handle authenticate-pam as optional dependency in npm package 2025-07-17 09:32:42 +02:00
binding.gyp fix: handle authenticate-pam as optional dependency in npm package 2025-07-17 09:32:42 +02:00
package.json fix: handle authenticate-pam as optional dependency in npm package 2025-07-17 09:32:42 +02:00
README.md fix: handle authenticate-pam as optional dependency in npm package 2025-07-17 09:32:42 +02:00

Vendored PTY

This is a vendored fork of node-pty v1.1.0-beta34 with the threading and shared pipe architecture removed.

Why?

The original node-pty uses a shared pipe/socket architecture through ConoutSocketWorker that causes issues when used heavily:

  • All PTY instances write to the same shared pipe
  • This can overwhelm other Electron processes (like VS Code) that are also listening on the pipe
  • Heavy usage from VibeTunnel causes crashes in other applications

What's Changed?

  1. Removed ConoutSocketWorker - No more worker threads for socket management
  2. Removed shared pipe architecture - Each PTY instance uses direct file descriptors
  3. Simplified Windows implementation - Direct socket connections without intermediary workers
  4. Kept core functionality - The essential PTY spawn/resize/kill operations remain unchanged

Building

npm install
npm run build

The native modules will be compiled during installation.

Usage

The API remains compatible with node-pty:

const pty = require('node-pty');
const ptyProcess = pty.spawn('bash', [], {
  name: 'xterm-color',
  cols: 80,
  rows: 30,
  cwd: process.env.HOME,
  env: process.env
});

ptyProcess.on('data', function(data) {
  console.log(data);
});

ptyProcess.write('ls\r');