Socket
Socket
Sign inDemoInstall

node-pty

Package Overview
Dependencies
Maintainers
3
Versions
164
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-pty - npm Package Compare versions

Comparing version 0.10.0-beta9 to 0.10.0

3

lib/eventEmitter2.js

@@ -6,2 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.EventEmitter2 = void 0;
var EventEmitter2 = /** @class */ (function () {

@@ -32,3 +33,3 @@ function EventEmitter2() {

},
enumerable: true,
enumerable: false,
configurable: true

@@ -35,0 +36,0 @@ });

@@ -8,2 +8,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.native = exports.open = exports.createTerminal = exports.fork = exports.spawn = void 0;
var terminalCtor;

@@ -10,0 +11,0 @@ if (process.platform === 'win32') {

@@ -8,2 +8,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.Terminal = exports.DEFAULT_ROWS = exports.DEFAULT_COLS = void 0;
var events_1 = require("events");

@@ -46,3 +47,3 @@ var eventEmitter2_1 = require("./eventEmitter2");

get: function () { return this._onData.event; },
enumerable: true,
enumerable: false,
configurable: true

@@ -52,3 +53,3 @@ });

get: function () { return this._onExit.event; },
enumerable: true,
enumerable: false,
configurable: true

@@ -58,3 +59,3 @@ });

get: function () { return this._pid; },
enumerable: true,
enumerable: false,
configurable: true

@@ -64,3 +65,3 @@ });

get: function () { return this._cols; },
enumerable: true,
enumerable: false,
configurable: true

@@ -70,3 +71,3 @@ });

get: function () { return this._rows; },
enumerable: true,
enumerable: false,
configurable: true

@@ -73,0 +74,0 @@ });

@@ -58,3 +58,3 @@ "use strict";

},
enumerable: true,
enumerable: false,
configurable: true

@@ -66,3 +66,3 @@ });

},
enumerable: true,
enumerable: false,
configurable: true

@@ -74,3 +74,3 @@ });

},
enumerable: true,
enumerable: false,
configurable: true

@@ -77,0 +77,0 @@ });

@@ -6,2 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.pollUntil = void 0;
function pollUntil(cb, timeout, interval) {

@@ -8,0 +9,0 @@ return new Promise(function (resolve, reject) {

@@ -16,2 +16,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.UnixTerminal = void 0;
/**

@@ -149,3 +150,3 @@ * Copyright (c) 2012-2015, Christopher Jeffrey (MIT License)

get: function () { return this._master; },
enumerable: true,
enumerable: false,
configurable: true

@@ -155,3 +156,3 @@ });

get: function () { return this._slave; },
enumerable: true,
enumerable: false,
configurable: true

@@ -231,3 +232,3 @@ });

},
enumerable: true,
enumerable: false,
configurable: true

@@ -234,0 +235,0 @@ });

@@ -7,2 +7,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.assign = void 0;
function assign(target) {

@@ -9,0 +10,0 @@ var sources = [];

@@ -8,2 +8,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.argsToCommandLine = exports.WindowsPtyAgent = void 0;
var os = require("os");

@@ -107,3 +108,3 @@ var path = require("path");

get: function () { return this._inSocket; },
enumerable: true,
enumerable: false,
configurable: true

@@ -113,3 +114,3 @@ });

get: function () { return this._outSocket; },
enumerable: true,
enumerable: false,
configurable: true

@@ -119,3 +120,3 @@ });

get: function () { return this._fd; },
enumerable: true,
enumerable: false,
configurable: true

@@ -125,3 +126,3 @@ });

get: function () { return this._innerPid; },
enumerable: true,
enumerable: false,
configurable: true

@@ -131,3 +132,3 @@ });

get: function () { return this._pty; },
enumerable: true,
enumerable: false,
configurable: true

@@ -206,3 +207,3 @@ });

},
enumerable: true,
enumerable: false,
configurable: true

@@ -209,0 +210,0 @@ });

@@ -21,2 +21,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.WindowsTerminal = void 0;
var terminal_1 = require("./terminal");

@@ -167,3 +168,3 @@ var windowsPtyAgent_1 = require("./windowsPtyAgent");

get: function () { return this._name; },
enumerable: true,
enumerable: false,
configurable: true

@@ -173,3 +174,3 @@ });

get: function () { throw new Error('master is not supported on Windows'); },
enumerable: true,
enumerable: false,
configurable: true

@@ -179,3 +180,3 @@ });

get: function () { throw new Error('slave is not supported on Windows'); },
enumerable: true,
enumerable: false,
configurable: true

@@ -182,0 +183,0 @@ });

@@ -7,3 +7,3 @@ {

},
"version": "0.10.0-beta9",
"version": "0.10.0",
"license": "MIT",

@@ -10,0 +10,0 @@ "main": "./lib/index.js",

@@ -14,24 +14,6 @@ # node-pty

## Real-world Uses
## API
`node-pty` powers many different terminal emulators, including:
The full API for node-pty is contained within the [TypeScript declaration file](https://github.com/microsoft/node-pty/blob/master/typings/node-pty.d.ts), use the branch/tag picker in GitHub (`w`) to navigate to the correct version of the API.
- [Microsoft Visual Studio Code](https://code.visualstudio.com)
- [Hyper](https://hyper.is/)
- [Upterm](https://github.com/railsware/upterm)
- [Script Runner](https://github.com/ioquatix/script-runner) for Atom.
- [Theia](https://github.com/theia-ide/theia)
- [FreeMAN](https://github.com/matthew-matvei/freeman) file manager
- [terminus](https://atom.io/packages/terminus) - An Atom plugin for providing terminals inside your Atom workspace.
- [x-terminal](https://atom.io/packages/x-terminal) - Also an Atom plugin that provides terminals inside your Atom workspace.
- [Termination](https://atom.io/packages/termination) - Also an Atom plugin that provides terminals inside your Atom workspace.
- [atom-xterm](https://atom.io/packages/atom-xterm) - Also an Atom plugin that provides terminals inside your Atom workspace.
- [electerm](https://github.com/electerm/electerm) Terminal/SSH/SFTP client(Linux, macOS, Windows).
- [Extraterm](http://extraterm.org/)
- [Wetty](https://github.com/krishnasrinivas/wetty) Browser based Terminal over HTTP and HTTPS
- [nomad](https://github.com/lukebarnard1/nomad-term)
- [DockerStacks](https://github.com/sfx101/docker-stacks) Local LAMP/LEMP stack using Docker
Do you use node-pty in your application as well? Please open a [Pull Request](https://github.com/Tyriar/node-pty/pulls) to include it here. We would love to have it in our list.
## Example Usage

@@ -62,2 +44,28 @@

## Real-world Uses
`node-pty` powers many different terminal emulators, including:
- [Microsoft Visual Studio Code](https://code.visualstudio.com)
- [Hyper](https://hyper.is/)
- [Upterm](https://github.com/railsware/upterm)
- [Script Runner](https://github.com/ioquatix/script-runner) for Atom.
- [Theia](https://github.com/theia-ide/theia)
- [FreeMAN](https://github.com/matthew-matvei/freeman) file manager
- [terminus](https://atom.io/packages/terminus) - An Atom plugin for providing terminals inside your Atom workspace.
- [x-terminal](https://atom.io/packages/x-terminal) - Also an Atom plugin that provides terminals inside your Atom workspace.
- [Termination](https://atom.io/packages/termination) - Also an Atom plugin that provides terminals inside your Atom workspace.
- [atom-xterm](https://atom.io/packages/atom-xterm) - Also an Atom plugin that provides terminals inside your Atom workspace.
- [electerm](https://github.com/electerm/electerm) Terminal/SSH/SFTP client(Linux, macOS, Windows).
- [Extraterm](http://extraterm.org/)
- [Wetty](https://github.com/krishnasrinivas/wetty) Browser based Terminal over HTTP and HTTPS
- [nomad](https://github.com/lukebarnard1/nomad-term)
- [DockerStacks](https://github.com/sfx101/docker-stacks) Local LAMP/LEMP stack using Docker
- [TeleType](https://github.com/akshaykmr/TeleType): cli tool that allows you to share your terminal online conveniently. Show off mad cli-fu, help a colleague, teach, or troubleshoot.
- [mesos-term](https://github.com/criteo/mesos-term): A web terminal for Apache Mesos. It allows to execute commands within containers.
- [Commas](https://github.com/CyanSalt/commas): A hackable terminal and command runner.
- [ENiGMA½ BBS Software](https://github.com/NuSkooler/enigma-bbs): A modern BBS software with a nostalgic flair!
Do you use node-pty in your application as well? Please open a [Pull Request](https://github.com/Tyriar/node-pty/pulls) to include it here. We would love to have it in our list.
## Building

@@ -84,2 +92,6 @@

### macOS
Xcode is needed to compile the sources, this can be installed from the App Store.
### Windows

@@ -121,5 +133,5 @@

// flow control in action
ptyProcess.write(PAUSE); // pty will block and pause the slave program
ptyProcess.write(PAUSE); // pty will block and pause the child program
...
ptyProcess.write(RESUME); // pty will enter flow mode and resume the slave program
ptyProcess.write(RESUME); // pty will enter flow mode and resume the child program

@@ -126,0 +138,0 @@ // temporarily disable/re-enable flow control

@@ -24,13 +24,2 @@ /**

/**
* The socket for the master file descriptor. This is not supported on
* Windows.
*/
master: net.Socket;
/**
* The socket for the slave file descriptor. This is not supported on Windows.
*/
slave: net.Socket;
/**
* Writes data to the socket.

@@ -37,0 +26,0 @@ * @param data The data to write.

@@ -38,3 +38,3 @@ /**

/**
* Working directory to be set for the slave program.
* Working directory to be set for the child program.
*/

@@ -44,3 +44,3 @@ cwd?: string;

/**
* Environment to be set for the slave program.
* Environment to be set for the child program.
*/

@@ -60,3 +60,3 @@ env?: { [key: string]: string };

* Whether to enable flow control handling (false by default). If enabled a message of `flowControlPause`
* will pause the socket and thus blocking the slave program execution due to buffer back pressure.
* will pause the socket and thus blocking the child program execution due to buffer back pressure.
* A message of `flowControlResume` will resume the socket into flow mode.

@@ -85,3 +85,3 @@ * For performance reasons only a single message as a whole will match (no message part matching).

* Security warning: use this option with great caution, as opened file descriptors
* with higher privileges might leak to the slave program.
* with higher privileges might leak to the child program.
*/

@@ -190,2 +190,12 @@ uid?: number;

kill(signal?: string): void;
/**
* Pauses the pty for customizable flow control.
*/
pause(): void;
/**
* Resumes the pty for customizable flow control.
*/
resume(): void;
}

@@ -192,0 +202,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc