Comparing version 0.5.0 to 0.5.1
@@ -7,5 +7,5 @@ { | ||
}, | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"license": "MIT", | ||
"main": "./lib/index.js", | ||
"main": "./index.js", | ||
"repository": { | ||
@@ -15,5 +15,2 @@ "type": "git", | ||
}, | ||
"files": [ | ||
"lib/" | ||
], | ||
"homepage": "https://github.com/Tyriar/node-pty", | ||
@@ -29,7 +26,6 @@ "bugs": { | ||
"scripts": { | ||
"tsc": "tsc", | ||
"tslint": "tslint src/**/*.ts", | ||
"install": "node scripts/install.js", | ||
"postinstall": "node scripts/post-install.js", | ||
"test": "cross-env NODE_ENV=test mocha -R spec test" | ||
"test": "NODE_ENV=test mocha -R spec", | ||
"test-windows": "set \"NODE_ENV=test\" && mocha -R spec test-windows" | ||
}, | ||
@@ -46,8 +42,4 @@ "tags": [ | ||
"devDependencies": { | ||
"@types/node": "^6.0.58", | ||
"cross-env": "^3.1.3", | ||
"mocha": "^3.1.2", | ||
"tslint": "^4.3.1", | ||
"typescript": "^2.1.4" | ||
"mocha": "~1.17.1" | ||
} | ||
} |
# node-pty | ||
**⚠️ This project is currently under development to improve Windows support, see [this issue](https://github.com/Microsoft/vscode/issues/13625) for more details.** | ||
`forkpty(3)` bindings for node.js. This allows you to fork processes with pseudo | ||
@@ -16,8 +18,5 @@ terminal file descriptors. It returns a terminal object which allows reads | ||
``` js | ||
var os = require('os'); | ||
var pty = require('node-pty'); | ||
var shell = os.platform() === 'win32' ? 'powershell.exe' : 'bash'; | ||
var ptyProcess = pty.spawn(shell, [], { | ||
var term = pty.spawn('bash', [], { | ||
name: 'xterm-color', | ||
@@ -30,27 +29,16 @@ cols: 80, | ||
ptyProcess.on('data', function(data) { | ||
term.on('data', function(data) { | ||
console.log(data); | ||
}); | ||
ptyProcess.write('ls\r'); | ||
ptyProcess.resize(100, 40); | ||
ptyProcess.write('ls\r'); | ||
term.write('ls\r'); | ||
term.resize(100, 40); | ||
term.write('ls /\r'); | ||
console.log(term.process); | ||
``` | ||
## Troubleshooting | ||
**Powershell gives error 8009001d** | ||
> | ||
Internal Windows PowerShell error. Loading managed Windows PowerShell failed with error 8009001d. | ||
This happens when PowerShell is launched with no `SystemRoot` environment variable present. | ||
## pty.js | ||
This project is forked from [chjj/pty.js](https://github.com/chjj/pty.js) with the primary goals being to provide better support for later Node.JS versions and Windows. | ||
## License | ||
Copyright (c) 2012-2015, Christopher Jeffrey (MIT License).<br> | ||
Copyright (c) 2012-2015, Christopher Jeffrey (MIT License). | ||
Copyright (c) 2016, Daniel Imms (MIT License). |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
588899
1
154
806
43
12
5