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.11.0-beta1 to 0.11.0-beta2

9

lib/windowsPtyAgent.js

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

exports.argsToCommandLine = exports.WindowsPtyAgent = void 0;
var fs = require("fs");
var os = require("os");

@@ -101,5 +102,9 @@ var path = require("path");

});
this._inSocket = new net_1.Socket();
var inSocketFD = fs.openSync(term.conin, 'w');
this._inSocket = new net_1.Socket({
fd: inSocketFD,
readable: false,
writable: true
});
this._inSocket.setEncoding('utf8');
this._inSocket.connect(term.conin);
if (this._useConpty) {

@@ -106,0 +111,0 @@ var connect = this._ptyNative.connect(this._pty, commandLine, cwd, env, function (c) { return _this._$onProcessExit(c); });

@@ -193,4 +193,13 @@ "use strict";

});
describe('winpty', function () {
it('should accept input', function (done) {
var term = new windowsTerminal_1.WindowsTerminal('cmd.exe', '', { useConpty: false });
term.write('exit\r');
term.on('exit', function () {
done();
});
});
});
});
}
//# sourceMappingURL=windowsTerminal.test.js.map

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

},
"version": "0.11.0-beta1",
"version": "0.11.0-beta2",
"license": "MIT",

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

@@ -16,3 +16,3 @@ # node-pty

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.
The full API for node-pty is contained within the [TypeScript declaration file](https://github.com/microsoft/node-pty/blob/main/typings/node-pty.d.ts), use the branch/tag picker in GitHub (`w`) to navigate to the correct version of the API.

@@ -19,0 +19,0 @@ ## Example Usage

@@ -7,2 +7,3 @@ /**

import * as fs from 'fs';
import * as os from 'os';

@@ -130,5 +131,9 @@ import * as path from 'path';

this._inSocket = new Socket();
const inSocketFD = fs.openSync(term.conin, 'w');
this._inSocket = new Socket({
fd: inSocketFD,
readable: false,
writable: true
});
this._inSocket.setEncoding('utf8');
this._inSocket.connect(term.conin);

@@ -135,0 +140,0 @@ if (this._useConpty) {

@@ -204,3 +204,13 @@ /**

});
describe('winpty', () => {
it('should accept input', (done) => {
const term = new WindowsTerminal('cmd.exe', '', { useConpty: false });
term.write('exit\r');
term.on('exit', () => {
done();
});
});
});
});
}

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