{"name":"node-pty","description":"Fork pseudoterminals in Node.JS","author":{"name":"Daniel Imms"},"version":"0.7.6-conpty3","license":"MIT","main":"./lib/index.js","types":"./typings/node-pty.d.ts","repository":{"type":"git","url":"git://github.com/Tyriar/node-pty.git"},"homepage":"https://github.com/Tyriar/node-pty","bugs":{"url":"https://github.com/Tyriar/node-pty/issues"},"keywords":["pty","tty","terminal","pseudoterminal","forkpty","openpty"],"scripts":{"tsc":"tsc","lint":"tslint 'src/**/*.ts'","install":"node scripts/install.js","postinstall":"node scripts/post-install.js","test":"cross-env NODE_ENV=test mocha -R spec --exit lib/*.test.js","prepublish":"npm run tsc"},"dependencies":{"nan":"2.10.0"},"devDependencies":{"@types/mocha":"^5.0.0","@types/node":"^6.0.104","cross-env":"^5.1.4","mocha":"^5.0.5","pollUntil":"^1.0.3","tslint":"^5.9.1","tslint-consistent-codestyle":"^1.13.0","typescript":"^2.8.1"},"readme":"# node-pty\r\n\r\n[![Build status](https://tyriar.visualstudio.com/_apis/public/build/definitions/2d361770-e039-4acc-b2b2-ef8396473589/1/badge)](https://tyriar.visualstudio.com/node-pty/_build/index?definitionId=1)\r\n\r\n`forkpty(3)` bindings for node.js. This allows you to fork processes with pseudoterminal file descriptors. It returns a terminal object which allows reads and writes.\r\n\r\nThis is useful for:\r\n\r\n- Writing a terminal emulator (eg. via [xterm.js](https://github.com/sourcelair/xterm.js)).\r\n- Getting certain programs to *think* you're a terminal, such as when you need a program to send you control sequences.\r\n\r\n`node-pty` supports Linux, macOS and Windows. Windows support is possible by utilizing the [winpty](https://github.com/rprichard/winpty) library.\r\n\r\n## Real-world Uses\r\n\r\n`node-pty` powers many different terminal emulators, including:\r\n\r\n- [Microsoft Visual Studio Code](https://code.visualstudio.com)\r\n- [Hyper](https://hyper.is/)\r\n- [Upterm](https://github.com/railsware/upterm)\r\n- [Script Runner](https://github.com/ioquatix/script-runner) for Atom.\r\n- [Theia](https://github.com/theia-ide/theia)\r\n- [FreeMAN](https://github.com/matthew-matvei/freeman) file manager\r\n- [atom-xterm](https://atom.io/packages/atom-xterm) - Atom plugin for providing terminals inside your Atom workspace.\r\n\r\nDo 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.\r\n\r\n## Example Usage\r\n\r\n```js\r\nvar os = require('os');\r\nvar pty = require('node-pty');\r\n\r\nvar shell = os.platform() === 'win32' ? 'powershell.exe' : 'bash';\r\n\r\nvar ptyProcess = pty.spawn(shell, [], {\r\n  name: 'xterm-color',\r\n  cols: 80,\r\n  rows: 30,\r\n  cwd: process.env.HOME,\r\n  env: process.env\r\n});\r\n\r\nptyProcess.on('data', function(data) {\r\n  console.log(data);\r\n});\r\n\r\nptyProcess.write('ls\\r');\r\nptyProcess.resize(100, 40);\r\nptyProcess.write('ls\\r');\r\n```\r\n\r\n## Building\r\n\r\n```bash\r\n# Install dependencies and build C++\r\nnpm install\r\n# Compile TypeScript -> JavaScript\r\nnpm run tsc\r\n```\r\n\r\n### Dependencies on Windows\r\n\r\n`npm install` requires some tools to be present in the system like Python and C++ compiler. Windows users can easily install them by running the following command in PowerShell as administrator. For more information see https://github.com/felixrieseberg/windows-build-tools:\r\n\r\n```sh\r\nnpm install --global --production windows-build-tools\r\n```\r\n\r\nThe Windows SDK is also needed which can be [downloaded here](https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk). Only the \"Desktop C++ Apps\" components are needed to be installed.\r\n\r\n## Debugging\r\n\r\nOn Windows, you can show the winpty agent console window by adding the environment variable `WINPTY_SHOW_CONSOLE=1` to the pty's environment. See https://github.com/rprichard/winpty#debugging-winpty for more information.\r\n\r\n## Troubleshooting\r\n\r\n**Powershell gives error 8009001d**\r\n\r\n> Internal Windows PowerShell error.  Loading managed Windows PowerShell failed with error 8009001d.\r\n\r\nThis happens when PowerShell is launched with no `SystemRoot` environment variable present.\r\n\r\n## pty.js\r\n\r\nThis 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.\r\n\r\n## License\r\n\r\nCopyright (c) 2012-2015, Christopher Jeffrey (MIT License).<br>\r\nCopyright (c) 2016, Daniel Imms (MIT License).\r\n","readmeFilename":"README.md","gitHead":"dc0922c6c4ac0d5ac86f41d75e28ab9ee47d4f4c","_id":"node-pty@0.7.6-conpty3","_npmVersion":"5.6.0","_nodeVersion":"8.11.4","_npmUser":{"name":"tyriar","email":"tyriar@tyriar.com"},"dist":{"integrity":"sha512-10+FPkoGOZB7Vq1P86XJrX41q8VfwwjSXUxwoP6TVW6IhgUbzZOcebafcpB5mKnRTuW91uBcrsWPp7SfEo0mWQ==","shasum":"dfb4cc33df82f0e9da4c045cb0449d0418b959ea","tarball":"http://registry-npm.ywwl.com/node-pty/download/node-pty-0.7.6-conpty3.tgz","fileCount":228,"unpackedSize":1043550,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbyQplCRA9TVsSAnZWagAAkYkP/jxTlXl3HrdaH+ZkiTCK\nfAxjPv9fwYnZriEZ1Og3OE0U00Zh+wqUlYf8805gUxuAcxzNdnnJNSctLZ6R\neUr3ZVVTBdqDgO+Bm8nYs+Ctmfteo286bIMdmk/L2t4vqt0FI6QrE+CKp39m\nnR5iRtVNoXymrrkf3DFGZhnSb9i+j9uzbKXIZYVxu/hdEGLnmXTay9yGnc2e\nAUvlpzvzd4+nX2yyFJpt5B1EBSY/nqKR5wjHHqd0mg35LgHy7dGp34DjMBzy\nPG80Gn1PW8RiYInxrzzZi9939AB4HfdUcOkHmX8QdeG2pN5GGHq01sr+AqTZ\nxpWZIs9geAMW4YQ6z0FWSRK3JCUwsC2Kf9UueQW/MudlSAIRgnWIAJMZghSe\nKz151ru1zyc+IJqNXubkhCyy0tGNWAVtCxDlmQ8ug8l82TexRdBgNcUp7HCO\nleINfxCkV1uv8yV6eVT676zlwS1m6kpEXeTYKf1w7Gc6h6uh9bXKXUf2yrOc\nBUdfPFGxcB7jjYyv0ou6RwtN5ii3/cn7k4r49hRV+KK7bPiKhFMKc/e27YQ+\nQ7P9QHEq+0Fdo4IrlKUzBTh5brE3lyNzh476boKYGBTR7898TCkSCIwwJtsb\nQWdISyJh4hxN5nNqmpAAWrKzgbTpJfBk1AE2FKI+q8lhl84Zr19YTtWFRbcG\nF2jQ\r\n=Wea+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDk7x5eieETVDavtOkrjSJJcmsZlzQ83CkA/iNIp3Uj3wIgaehddM/gduWyrpUm7AUGJWMTGzfshb0//E1coWH1rD4="}],"size":224404,"noattachment":false,"key":"/node-pty/-/node-pty-0.7.6-conpty3.tgz"},"maintainers":[{"email":"alros@microsoft.com","name":"alexr00"},{"email":"npmjs@microsoft.com","name":"microsoft"},{"email":"tyriar@tyriar.com","name":"tyriar"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-pty_0.7.6-conpty3_1539902052713_0.7660028631670137"},"_hasShrinkwrap":false,"publish_time":1539902052948,"_cnpm_publish_time":1539902052948,"dist-tags":{"alpha":"0.10.0-alpha1","beta":"1.2.0-beta.18","conpty":"0.7.8-conpty1","latest":"1.1.0"}}