{"_id":"nexpect","_rev":"44-31b35efb58a5337ad2400035b834620c","name":"nexpect","description":"Spawns and interacts with child processes using spawn / expect commands","dist-tags":{"latest":"0.6.0"},"versions":{"0.1.0":{"name":"nexpect","description":"spawns and interacts with child processes using spawn / expect commands","version":"0.1.0","author":{"name":"Elijah Insua","email":"tmpvar@gmail.com"},"repository":{"type":"git","url":"http://github.com/nodejitsu/nexpect.git"},"keywords":["nexpect","spawn","child process","terminal"],"dependencies":{},"main":"./lib/nexpect","scripts":{"test":"vows"},"engines":{"node":">= 0.2.0"},"_id":"nexpect@0.1.0","_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/nexpect/-/nexpect-0.1.0.tgz","shasum":"122cde6a38121e8869c6ce2681817043a87be92e","integrity":"sha512-vNcnP6Jut99ERsMhKbjQBlw7Wp4h6iUvI0B5kwKQZYc7hi7gqxprsDf57usS4ehedyYpNMrY8Oub95rkGXd4uA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG9liVTwbpQzAXXDL/+76+JUpOlsUnIRlMethjmTtDciAiBJ4xUQe6CzOGgcQ1EcQcfIFScvDnkkpnyHQepQR2oqXg=="}]},"directories":{}},"0.2.1":{"name":"nexpect","description":"Spawns and interacts with child processes using spawn / expect commands","version":"0.2.1","author":{"name":"Elijah Insua","email":"tmpvar@gmail.com"},"contributors":[{"name":"Charlie Robbins","email":"charlie@nodejitsu.com"},{"name":"Marak Squires","email":"marak@nodejitsu.com"}],"repository":{"type":"git","url":"git://github.com/nodejitsu/nexpect.git"},"keywords":["nexpect","spawn","child process","terminal"],"devDependencies":{"colors":"0.x.x","prompt":"0.1.x >=0.1.5","vows":"0.5.x"},"main":"./lib/nexpect","scripts":{"test":"vows --spec"},"engines":{"node":">= 0.2.0"},"_npmJsonOpts":{"file":"/Users/Charlie/.npm/nexpect/0.2.1/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"nexpect@0.2.1","dependencies":{},"_engineSupported":true,"_npmVersion":"1.0.23","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"a3cfaaf253c453681ef6c32163aa0ddc6fd6b219","tarball":"https://registry.npmjs.org/nexpect/-/nexpect-0.2.1.tgz","integrity":"sha512-ze/bwrOTUx1TPG1Kal50lvA1UvJc/jLl92DP75nStITgNehLDVD0MBl/KUpqWIBnde0xpY2Vy5GsJI6xvOFnUA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA7UEKkTN60zn8ROAP/L7lo6XTnHv3OElRyG2KiGdsNMAiEAqmin5i0Hhykf8unDsEEJMIxlww4nQUBVyurQqQywA8w="}]},"maintainers":[{"name":"marak","email":"marak.squires@gmail.com"},{"name":"indexzero","email":"charlie.robbins@gmail.com"}],"directories":{}},"0.2.2":{"name":"nexpect","description":"Spawns and interacts with child processes using spawn / expect commands","version":"0.2.2","author":{"name":"Elijah Insua","email":"tmpvar@gmail.com"},"contributors":[{"name":"Charlie Robbins","email":"charlie@nodejitsu.com"},{"name":"Marak Squires","email":"marak@nodejitsu.com"}],"repository":{"type":"git","url":"git://github.com/nodejitsu/nexpect.git"},"keywords":["nexpect","spawn","child process","terminal"],"devDependencies":{"colors":"0.x.x","prompt":"0.1.x >=0.1.5","vows":"0.5.x"},"main":"./lib/nexpect","scripts":{"test":"vows --spec"},"engines":{"node":">= 0.2.0"},"_npmJsonOpts":{"file":"/Users/Charlie/.npm/nexpect/0.2.2/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"nexpect@0.2.2","dependencies":{},"_engineSupported":true,"_npmVersion":"1.0.23","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"e58c25759ca558077aefa7b07657df8dfd663bfb","tarball":"https://registry.npmjs.org/nexpect/-/nexpect-0.2.2.tgz","integrity":"sha512-5Mrh3Yh3QyG/YjRsvBaiBbP8AryuaN/+VfaGCAYcNgaecQk1IYwcOgLFYpGYQW5dP3yYMFWlw6eOh2hYFMdiVw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA9UylfUTg1VTfeVRErZbA+vPh1kQryZw2lEUMf9qEhIAiEAgridqN/CU+M0JztueO7+2VoJjvi9i49fWlJxhXjafBI="}]},"maintainers":[{"name":"marak","email":"marak.squires@gmail.com"},{"name":"indexzero","email":"charlie.robbins@gmail.com"}],"directories":{}},"0.2.3":{"name":"nexpect","description":"Spawns and interacts with child processes using spawn / expect commands","version":"0.2.3","author":{"name":"Elijah Insua","email":"tmpvar@gmail.com"},"contributors":[{"name":"Charlie Robbins","email":"charlie@nodejitsu.com"},{"name":"Marak Squires","email":"marak@nodejitsu.com"}],"repository":{"type":"git","url":"git://github.com/nodejitsu/nexpect.git"},"keywords":["nexpect","spawn","child process","terminal"],"devDependencies":{"colors":"0.x.x","prompt":"0.1.x >=0.1.5","vows":"0.5.x"},"main":"./lib/nexpect","scripts":{"test":"vows --spec"},"engines":{"node":">= 0.2.0"},"_npmJsonOpts":{"file":"/Users/Charlie/.npm/nexpect/0.2.3/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"nexpect@0.2.3","dependencies":{},"_engineSupported":true,"_npmVersion":"1.0.23","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"0646c52f9435706e363accf2ff24d5d618045564","tarball":"https://registry.npmjs.org/nexpect/-/nexpect-0.2.3.tgz","integrity":"sha512-gEMYsB4QN5xP7ptEYGlOcdEaAk5lE0DBO7RIy/eVkdLNDSqRA3FhtdEfwUkiUEpyA+AorPlXH10wnwvC2dYR8g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBkqihH8mIL8UYt1ghQKeoiMuMW6+T2UiZpIhBqhHkYQAiEAkMtCE6Sr9YDkwughWtl9j4qLGX7ObZlLrXylNqz/DEo="}]},"maintainers":[{"name":"marak","email":"marak.squires@gmail.com"},{"name":"indexzero","email":"charlie.robbins@gmail.com"}],"directories":{}},"0.2.4":{"name":"nexpect","description":"Spawns and interacts with child processes using spawn / expect commands","version":"0.2.4","author":{"name":"Elijah Insua","email":"tmpvar@gmail.com"},"contributors":[{"name":"Charlie Robbins","email":"charlie@nodejitsu.com"},{"name":"Marak Squires","email":"marak@nodejitsu.com"}],"repository":{"type":"git","url":"git://github.com/nodejitsu/nexpect.git"},"keywords":["nexpect","spawn","child process","terminal"],"devDependencies":{"colors":"0.x.x","prompt":"0.1.x >=0.1.5","vows":"0.5.x"},"main":"./lib/nexpect","scripts":{"test":"vows --spec"},"engines":{"node":">= 0.2.0"},"_npmJsonOpts":{"file":"/Users/Charlie/.npm/nexpect/0.2.4/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"nexpect@0.2.4","dependencies":{},"_engineSupported":true,"_npmVersion":"1.0.23","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"e682232e94f13637d1256ae09a741c0d3d5b475b","tarball":"https://registry.npmjs.org/nexpect/-/nexpect-0.2.4.tgz","integrity":"sha512-LM69akz0rALJgqzYmJ2+J7ViUBpaxfgNHeYe2KZkmcbBt6/gvxjUEFgb8nwrEGhMWcHeLBys/S0fop29JC+eXQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFGeofLazqbexHPLU4KVQx124jzX4DVumIPhigdseU5ZAiBK+KwWUxGMRF83cVidBHRFsxP05W0xQSZWNkYTPdW4qQ=="}]},"maintainers":[{"name":"marak","email":"marak.squires@gmail.com"},{"name":"indexzero","email":"charlie.robbins@gmail.com"}],"directories":{}},"0.3.0":{"name":"nexpect","description":"Spawns and interacts with child processes using spawn / expect commands","version":"0.3.0","author":{"name":"Nodejitsu Inc.","email":"info@nodejitsu.com"},"maintainers":[{"name":"marak","email":"marak.squires@gmail.com"},{"name":"indexzero","email":"charlie.robbins@gmail.com"}],"repository":{"type":"git","url":"http://github.com/nodejitsu/nexpect.git"},"keywords":["nexpect","spawn","child process","terminal"],"devDependencies":{"colors":"0.x.x","prompt":"~0.2.11","vows":"~0.5.x"},"main":"./lib/nexpect","scripts":{"test":"vows --spec"},"engines":{"node":">=0.8.0"},"bugs":{"url":"https://github.com/nodejitsu/nexpect/issues"},"homepage":"https://github.com/nodejitsu/nexpect","_id":"nexpect@0.3.0","dist":{"shasum":"ace2929822f1ea5e816b292d73544f53c354b81d","tarball":"https://registry.npmjs.org/nexpect/-/nexpect-0.3.0.tgz","integrity":"sha512-fSjUxmh1cHZxH2r3u67ndbKCZUtY/53Wj1WtTmoRh4hsNkybyDCjL+8W/mkPCaU0JRgoXjxma9Hqr3iVy2QBIQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCblfdHoBrpc+yo2R1PR9WifutOCC5Z5O5HRzhROsi+yQIgQ2l2LhwntLaQS82u2DYs497CDxahDH9Zekxmkj3A4lU="}]},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"indexzero","email":"charlie.robbins@gmail.com"},"directories":{}},"0.4.0":{"name":"nexpect","description":"Spawns and interacts with child processes using spawn / expect commands","version":"0.4.0","author":{"name":"Nodejitsu Inc.","email":"info@nodejitsu.com"},"maintainers":[{"name":"marak","email":"marak.squires@gmail.com"},{"name":"indexzero","email":"charlie.robbins@gmail.com"},{"name":"octet","email":"sam@strongloop.com"},{"name":"bajtos","email":"miro.bajtos@gmail.com"}],"repository":{"type":"git","url":"http://github.com/nodejitsu/nexpect.git"},"keywords":["nexpect","spawn","child process","terminal"],"devDependencies":{"colors":"0.x.x","prompt":"~0.2.11","vows":"~0.5.x"},"main":"./lib/nexpect","scripts":{"test":"vows --spec"},"engines":{"node":">=0.8.0"},"bugs":{"url":"https://github.com/nodejitsu/nexpect/issues"},"homepage":"https://github.com/nodejitsu/nexpect","_id":"nexpect@0.4.0","dist":{"shasum":"846c4e8095173b2af692ff3bec88e218748a8df4","tarball":"https://registry.npmjs.org/nexpect/-/nexpect-0.4.0.tgz","integrity":"sha512-1LQBU5mbL7rU/I+JRp7fusxjD30OT2m3ccrvz08loaXs+7/kEldkZgkw1B/uqDhI0IcyRy3spP8rG43d9xa3bw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGvsd7JffRrvd+WWO+O4pAF7qCzaL8KCgf1VNoFivj9EAiA4HUt/2dxgynIBOcxl41rD/9sZwVzkDvFT0t9PhnKdbg=="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"bajtos","email":"miro.bajtos@gmail.com"},"directories":{}},"0.4.2":{"name":"nexpect","description":"Spawns and interacts with child processes using spawn / expect commands","version":"0.4.2","author":{"name":"Nodejitsu Inc.","email":"info@nodejitsu.com"},"maintainers":[{"name":"marak","email":"marak.squires@gmail.com"},{"name":"indexzero","email":"charlie.robbins@gmail.com"},{"name":"octet","email":"sam@strongloop.com"},{"name":"bajtos","email":"miro.bajtos@gmail.com"}],"repository":{"type":"git","url":"http://github.com/nodejitsu/nexpect.git"},"keywords":["nexpect","spawn","child process","terminal"],"devDependencies":{"colors":"0.x.x","prompt":"~0.2.11","vows":"~0.5.x"},"main":"./lib/nexpect","scripts":{"test":"vows --spec"},"engines":{"node":">=0.8.0"},"bugs":{"url":"https://github.com/nodejitsu/nexpect/issues"},"homepage":"https://github.com/nodejitsu/nexpect","_id":"nexpect@0.4.2","dist":{"shasum":"f51335abf18b95f6fd6b0c32788ed16fad2572ac","tarball":"https://registry.npmjs.org/nexpect/-/nexpect-0.4.2.tgz","integrity":"sha512-n/WgE+D1Iqpw0UaXV2YY4aL4lFLX9h8Cq5W95P2BheB10US3DMwVH/HsmCNoCELs6TKe1s+bL/utmguC7y+g4g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFklN0ZBAmGgwyl+ZUPoxWwHau09k10fFTb3q+0uNIitAiAOZDzIWeo910OgGpVzd6kDOf2t610I39GJ6YLl/xmRuA=="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"bajtos","email":"miro.bajtos@gmail.com"},"directories":{}},"0.5.0":{"name":"nexpect","description":"Spawns and interacts with child processes using spawn / expect commands","version":"0.5.0","author":{"name":"Nodejitsu Inc.","email":"info@nodejitsu.com"},"maintainers":[{"name":"marak","email":"marak.squires@gmail.com"},{"name":"indexzero","email":"charlie.robbins@gmail.com"},{"name":"octet","email":"sam@strongloop.com"},{"name":"bajtos","email":"miro.bajtos@gmail.com"}],"repository":{"type":"git","url":"http://github.com/nodejitsu/nexpect.git"},"keywords":["nexpect","spawn","child process","terminal"],"devDependencies":{"colors":"0.x.x","prompt":"~0.2.11","vows":"~0.5.x"},"main":"./lib/nexpect","scripts":{"test":"vows --spec"},"engines":{"node":">=0.8.0"},"gitHead":"57dcf9570e8ffff118f531ee8f3004477c64b9c5","bugs":{"url":"https://github.com/nodejitsu/nexpect/issues"},"homepage":"https://github.com/nodejitsu/nexpect","_id":"nexpect@0.5.0","_shasum":"f185cf4d3acb5ce38ad7740f5dfa4004559946e0","_from":".","_npmVersion":"2.2.0","_nodeVersion":"0.10.33","_npmUser":{"name":"indexzero","email":"charlie.robbins@gmail.com"},"dist":{"shasum":"f185cf4d3acb5ce38ad7740f5dfa4004559946e0","tarball":"https://registry.npmjs.org/nexpect/-/nexpect-0.5.0.tgz","integrity":"sha512-+PxDUxz/zGKIQG/vEYBa1oBauCsmKun9lUfyve8jm/XXF8nq2s1aDPIHN0GgvEbO7XOJ1kv8qB9eiWeU99HTiA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICKd5QU4EsHe9TIyS+2IWcTI1UpJ+45c1+Xe2iIKLBI/AiEA5ouRziHpMeLho++d9XxLaFKyropCPmSam3YTFmzMhV0="}]},"directories":{}},"0.6.0":{"name":"nexpect","description":"Spawns and interacts with child processes using spawn / expect commands","version":"0.6.0","author":{"name":"Nodejitsu Inc.","email":"info@nodejitsu.com"},"license":"MIT","maintainers":[{"email":"mbajtoss@gmail.com","name":"bajtos"},{"email":"charlie.robbins@gmail.com","name":"indexzero"},{"email":"marak.squires@gmail.com","name":"marak"},{"email":"vieuxtech@gmail.com","name":"octet"}],"repository":{"type":"git","url":"git+ssh://git@github.com/nodejitsu/nexpect.git"},"keywords":["nexpect","spawn","child process","terminal"],"dependencies":{"cross-spawn":"^6.0.5"},"devDependencies":{"colors":"^1.3.3","prompt":"^1.0.0","vows":"^0.8.2"},"main":"./lib/nexpect","scripts":{"test":"vows --spec"},"engines":{"node":">=6"},"gitHead":"24aee43f4c5fd28d1693f7279219238f9a23033a","bugs":{"url":"https://github.com/nodejitsu/nexpect/issues"},"homepage":"https://github.com/nodejitsu/nexpect#readme","_id":"nexpect@0.6.0","_nodeVersion":"10.15.0","_npmVersion":"6.7.0","_npmUser":{"name":"indexzero","email":"charlie.robbins@gmail.com"},"dist":{"integrity":"sha512-gG4cO0zoNG+kaPesw516hPVEKLW3YizGU8UWMr5lpkHKOgoTWcu4sPQN7rWVAIL4Ck87zM4N8immPUhYPdDz3g==","shasum":"6c8c6460d418c0855e8b65462474a73f256a753b","tarball":"https://registry.npmjs.org/nexpect/-/nexpect-0.6.0.tgz","fileCount":17,"unpackedSize":26998,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcoBcqCRA9TVsSAnZWagAAHUIP/i3ti9DX1uHD47GBza+i\nYZ94T/Sr496gkyvKgrkg8sbhQ0w+as8/CAXR/1td5PTa2eBirJW0rTALcvQL\naRt9gzVqJHSCPYb07CGJ7ByJrdnZ9smTuKOJk2W/VQuOsgAGJdHj6knYsZI5\nW3/fLssi9Z44IMsQFr1PY+TEXyAGSicjCPm4DfcTy316CZfVVW+qVSrokEiS\n2elC52KK82gVI0X8R91X5STsvUsqfAUExhYgSP4BdtESl+mP39qOI8xtj5cr\naevy6i/SOZN+6799obguLc+C06oDvhWA8LdEVxFMy8u4B9EkUyUU9NazhtHF\nL0lkwzv8HE7nbzb/pHAkXjgnL61aWMoYdcQ5j8tD0wvZwieaoUnr7Z5IhX2X\na67hNU8kGLamIZSccO7SMljWx9lsnGuJBmtMfg07I6z1zilDvydFzfttDAVc\nqPtQm988EjNW8fSiaVknTM2QVUuHSxp/TVDwV0NNutXobU722EKEJE5jKsbz\nhoDeJwFRQlBvBKJNWVWo/4CV8bxSbPdu3qWVtUyhwmLf42btVHZpQ0Mw6ii9\noCHcwTbr4kZBz3ozrAiznCm3LeUYXHiuW75ZaQ7xmYC+Zh024Z2ZCYRAYUQR\nOAh77bHqUfBz//moqoICzV8xay6zJhIgKE4VQYi5SoqrHdwTEHSdgza4Ztri\nZ9U0\r\n=GIss\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC61GjTpoiLp0D6eba/86m8dAs6xAcJ9yw4DsreVYDeCAiEAjJSuT18bQNbNYEHJuvu5gVQOTgqtxBCCdo16Yy1jtPU="}]},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nexpect_0.6.0_1553995561806_0.2307108708955632"},"_hasShrinkwrap":false}},"maintainers":[{"email":"mbajtoss@gmail.com","name":"bajtos"},{"email":"charlie.robbins@gmail.com","name":"indexzero"},{"email":"marak.squires@gmail.com","name":"marak"},{"email":"vieuxtech@gmail.com","name":"octet"}],"author":{"name":"Nodejitsu Inc.","email":"info@nodejitsu.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/nodejitsu/nexpect.git"},"time":{"modified":"2022-06-21T02:22:01.337Z","created":"2011-08-10T04:40:29.634Z","0.1.0":"2011-08-10T04:40:29.634Z","0.2.1":"2011-08-10T05:03:57.597Z","0.2.2":"2011-08-10T07:46:46.264Z","0.2.3":"2011-08-10T09:24:58.514Z","0.2.4":"2011-08-10T15:40:36.363Z","0.3.0":"2013-12-20T11:26:11.539Z","0.4.0":"2014-04-15T08:20:44.516Z","0.4.1":"2014-05-09T08:27:56.592Z","0.4.2":"2014-05-09T08:31:40.504Z","0.5.0":"2015-01-29T23:28:23.683Z","0.6.0":"2019-03-31T01:26:01.953Z"},"readme":"# nexpect\n\n`nexpect` is a node.js module for spawning child applications (such as ssh) and\nseamlessly controlling them using javascript callbacks. nexpect is based on the\nideas of the [expect][0] library by Don Libes and the [pexpect][1] library by\nNoah Spurrier.\n\n## Motivation\n\nnode.js has good built in control for spawning child processes. `nexpect` builds\non these core methods and allows developers to easily pipe data to child\nprocesses and assert the expected response. `nexpect` also chains, so you can\ncompose complex terminal interactions.\n\n## Installation\n\n``` bash\n  $ npm install --save nexpect\n```\n\n## Usage\n\n### require('nexpect')\n\nThe module exposes a single function, `.spawn`.\n\n### function spawn (command, [params], [options])\n\n* command {string|Array} The command that you wish to spawn, a string will be\n  split on `' '` to find the params if params not provided (so do not use the\n  string variant if any arguments have spaces in them)\n* params {Array} **Optional** Argv to pass to the child process\n* options {Object} **Optional** An object literal which may contain\n  - cwd: Current working directory of the child process.\n  - env: Environment variables for the child process.\n  - ignoreCase: Ignores the case of any output from the child process.\n  - stripColors: Strips any ANSI colors from the output for `.expect()` and `.wait()` statements.\n  - stream: Expectations can be written against 'stdout', 'stderr', or 'all', which runs expectations against both stdout and stderr\n    (defaults to 'stdout')\n  - verbose: Writes the stdout for the child process to `process.stdout` of the current process,\n    and any data sent with sendline to the `process.stdout` of the current\n    process.\n\n\nTop-level entry point for `nexpect` that liberally parses the arguments\nand then returns a new chain with the specified `command`, `params`, and `options`.\n\n### function expect (expectation)\n\n* expectation {string|RegExp} Output to assert on the target stream\n\nExpect that the next line of output matches the expectation.\nThrow an error if it does not.\n\nThe expectation can be a string (the line should contain the expected value as\na substring) or a RegExp (the line should match the expression).\n\n### function wait (expectation, callback)\n\n* expectation {string|RegExp} Output to assert on the target stream\n* callback {Function} **Optional** Callback to be called when output matches stream\n\nWait for a line of output that matches the expectation, discarding lines\nthat do not match.\n\nThrow an error if no such line was found.\n\nThe expectation can be a string (the line should contain the expected value as\na substring) or a RegExp (the line should match the expression).\n\nThe callback will be called for every line that matches the expectation.\n\n### function sendline (line)\n\n* line {string} Output to write to the child process.\n\nAdds a write line to `context.process.stdin` to the `context.queue`\nfor the current chain.\n\n### function sendEof ()\n\nClose child's stdin stream, let the child know there are no more data coming.\n\nThis is useful for testing apps that are using inquirer,\nas `inquirer.prompt()` calls `stdin.resume()` at some point,\nwhich causes the app to block on input when the input stream is a pipe.\n\n### function run (callback)\n\n* callback {function} Called when child process closes, with arguments\n  * err {Error|null} Error if any occurred\n  * output {Array} Array of lines of output examined\n  * exit {Number|String} Numeric exit code, or String name of signal\n\nRuns the `context` against the specified `context.command` and\n`context.params`.\n\n\n## Example\n\nLets take a look at some sample usage:\n\n``` js\n  var nexpect = require('nexpect');\n\n  nexpect.spawn(\"echo\", [\"hello\"])\n         .expect(\"hello\")\n         .run(function (err, stdout, exitcode) {\n           if (!err) {\n             console.log(\"hello was echoed\");\n           }\n         });\n\n  nexpect.spawn(\"ls -la /tmp/undefined\", { stream: 'stderr' })\n         .expect(\"No such file or directory\")\n         .run(function (err) {\n           if (!err) {\n             console.log(\"checked that file doesn't exists\");\n           }\n         });\n\n  nexpect.spawn(\"node --interactive\")\n         .expect(\">\")\n         .sendline(\"console.log('testing')\")\n         .expect(\"testing\")\n         .sendline(\"process.exit()\")\n         .run(function (err) {\n           if (!err) {\n             console.log(\"node process started, console logged, process exited\");\n           }\n           else {\n             console.log(err)\n           }\n         });\n```\n\nIf you are looking for more examples take a look at the [examples][2], and [tests][3].\n\n## Tests\n\nAll tests are written with [vows][4]:\n\n``` bash\n  $ npm test\n```\n\n## Authors\n\n[Elijah Insua][5] [Marak Squires][6], and [Charlie Robbins][7].\n\n[0]: http://search.cpan.org/~rgiersig/Expect-1.21/Expect.pod\n[1]: http://pexpect.sourceforge.net/pexpect.html\n[2]: https://github.com/nodejitsu/nexpect/tree/master/examples\n[3]: https://github.com/nodejitsu/nexpect/tree/master/test/nexpect-test.js\n[4]: http://vowsjs.org\n[5]: http://github.com/tmpvar\n[6]: http://github.com/marak\n[7]: http://github.com/indexzero\n","readmeFilename":"README.md","homepage":"https://github.com/nodejitsu/nexpect#readme","keywords":["nexpect","spawn","child process","terminal"],"bugs":{"url":"https://github.com/nodejitsu/nexpect/issues"},"users":{"dypsilon":true,"jimnox":true,"subchen":true,"nguru":true,"rsp":true},"license":"MIT"}