{"_id":"browser-launcher2","_rev":"14-1023b76f8040393b5e49f00ed92baafb","name":"browser-launcher2","description":"Detect, launch and stop browser versions","dist-tags":{"latest":"0.4.6"},"versions":{"0.4.0":{"name":"browser-launcher2","version":"0.4.0","description":"Detect, launch and stop browser versions","main":"index.js","scripts":{"lint":"jscs . && jshint index.js lib/ example/"},"directories":{"example":"example","res":"res"},"dependencies":{"headless":"^0.1.7","lodash":"^2.4.1","mkdirp":"^0.5.0","osenv":"^0.1.0","plist":"^1.0.1","win-detect-browsers":"^0.0.2"},"repository":{"type":"git","url":"git://github.com/benderjs/browser-launcher2.git"},"homepage":"https://github.com/benderjs/browser-launcher2","keywords":["browser","headless","phantom","chrome","firefox","chromium","safari","ie","opera","osx","windows"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"contributors":[{"name":"CKSource","url":"http://cksource.com/"}],"license":"MIT","engine":{"node":">=0.8"},"devDependencies":{"jscs":"^1.5.8","jshint":"^2.5.2"},"gitHead":"b251f5db535219dd4360039a4b6570176f4be83d","bugs":{"url":"https://github.com/benderjs/browser-launcher2/issues"},"_id":"browser-launcher2@0.4.0","_shasum":"ea2a66bcab26415a9f11728f66f885416092e7eb","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"cksource","email":"npm@cksource.com"},"maintainers":[{"name":"cksource","email":"npm@cksource.com"}],"dist":{"shasum":"ea2a66bcab26415a9f11728f66f885416092e7eb","tarball":"https://registry.npmjs.org/browser-launcher2/-/browser-launcher2-0.4.0.tgz","integrity":"sha512-SuwzxBWQtbJ+asI9pPDG94CTRPgDdoqROKJU0R3OxS+/NC+AMyeuv76xIEJjb7ZUZrxH9yTI6NiZ0za0htNYyg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBGnKVsJMZgHHBvcrE7gmA2VKPRno6HZr6u911JZVejaAiBvrgwM6vjMuLX19AbXugVu0ZP+GbHJ3ytIK25wsWobfA=="}]}},"0.4.1":{"name":"browser-launcher2","version":"0.4.1","description":"Detect, launch and stop browser versions","main":"index.js","scripts":{"lint":"jscs . && jshint index.js lib/ example/"},"directories":{"example":"example","res":"res"},"dependencies":{"headless":"^0.1.7","lodash":"^2.4.1","mkdirp":"^0.5.0","osenv":"^0.1.0","plist":"^1.0.1","win-detect-browsers":"^0.0.2"},"repository":{"type":"git","url":"git://github.com/benderjs/browser-launcher2.git"},"homepage":"https://github.com/benderjs/browser-launcher2","keywords":["browser","headless","phantom","chrome","firefox","chromium","safari","ie","opera","osx","windows"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"contributors":[{"name":"CKSource","url":"http://cksource.com/"}],"license":"MIT","engine":{"node":">=0.8"},"devDependencies":{"jscs":"^1.5.8","jshint":"^2.5.2"},"gitHead":"cda6e6461814de133ef6b955fab5e1e284928e96","bugs":{"url":"https://github.com/benderjs/browser-launcher2/issues"},"_id":"browser-launcher2@0.4.1","_shasum":"077a5a43e25b6d11be17c5d4fa31fdbfe92a1d14","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"cksource","email":"npm@cksource.com"},"maintainers":[{"name":"cksource","email":"npm@cksource.com"}],"dist":{"shasum":"077a5a43e25b6d11be17c5d4fa31fdbfe92a1d14","tarball":"https://registry.npmjs.org/browser-launcher2/-/browser-launcher2-0.4.1.tgz","integrity":"sha512-Jd1rzBDDpxQ2ilqMsGDu76W9P06dWnudreKGnbiiywdbssbT2wfDyQeROyambLZevZU6KAs8APns6PW6nLMx5g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqS1Lyp6xk7f0WrHMb73iEmwQ25GZ/wvnveYgW71slGgIhANe5/cuigZwLRbStSVHT4CPWobDSeU/B21Ntmsp4HSTG"}]}},"0.4.2":{"name":"browser-launcher2","version":"0.4.2","description":"Detect, launch and stop browser versions","main":"index.js","scripts":{"lint":"jscs . && jshint index.js lib/ example/"},"directories":{"example":"example","res":"res"},"dependencies":{"headless":"^0.1.7","lodash":"^2.4.1","mkdirp":"^0.5.0","osenv":"^0.1.0","plist":"^1.0.1","win-detect-browsers":"^0.0.2"},"repository":{"type":"git","url":"git://github.com/benderjs/browser-launcher2.git"},"homepage":"https://github.com/benderjs/browser-launcher2","keywords":["browser","headless","phantom","chrome","firefox","chromium","safari","ie","opera","osx","windows"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"contributors":[{"name":"CKSource","url":"http://cksource.com/"}],"license":"MIT","engine":{"node":">=0.8"},"devDependencies":{"jscs":"^1.5.8","jshint":"^2.5.2"},"bugs":{"url":"https://github.com/benderjs/browser-launcher2/issues"},"_id":"browser-launcher2@0.4.2","_shasum":"6cb6d4fe1a8bb52b57719a0d62fa4ba780b95393","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"cksource","email":"npm@cksource.com"},"maintainers":[{"name":"cksource","email":"npm@cksource.com"}],"dist":{"shasum":"6cb6d4fe1a8bb52b57719a0d62fa4ba780b95393","tarball":"https://registry.npmjs.org/browser-launcher2/-/browser-launcher2-0.4.2.tgz","integrity":"sha512-Z1VbihlCQJAXjh9IItUbO5DRbyay4SFkJI8Dd+oIsedptRSJXO9eCEyniFSAXxm23SNP+zYgggkZnHUDz3XC9Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCS8B7MYA9ul4W0Sg7kbKOF4g2IZ5Z9KDV9huZGhAKx/QIgEjl5ShxRni8vCpPxKBCNAaoW/79LaMjsb5Ynl5YgtDI="}]}},"0.4.3":{"name":"browser-launcher2","version":"0.4.3","description":"Detect, launch and stop browser versions","main":"index.js","scripts":{"lint":"jscs . && jshint index.js lib/ example/"},"directories":{"example":"example","res":"res"},"dependencies":{"headless":"^0.1.7","lodash":"^2.4.1","mkdirp":"^0.5.0","osenv":"^0.1.0","plist":"^1.0.1","win-detect-browsers":"^0.0.2"},"repository":{"type":"git","url":"git://github.com/benderjs/browser-launcher2.git"},"homepage":"https://github.com/benderjs/browser-launcher2","keywords":["browser","headless","phantom","chrome","firefox","chromium","safari","ie","opera","osx","windows"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"contributors":[{"name":"CKSource","url":"http://cksource.com/"}],"license":"MIT","engine":{"node":">=0.8"},"devDependencies":{"jscs":"^1.5.8","jshint":"^2.5.2"},"gitHead":"fd56eb1e6f065234fee8f57fedd12f04e58f308c","bugs":{"url":"https://github.com/benderjs/browser-launcher2/issues"},"_id":"browser-launcher2@0.4.3","_shasum":"4df95a3f21551be5e37260fe5f2ecb57c7b026e9","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"cksource","email":"npm@cksource.com"},"maintainers":[{"name":"cksource","email":"npm@cksource.com"}],"dist":{"shasum":"4df95a3f21551be5e37260fe5f2ecb57c7b026e9","tarball":"https://registry.npmjs.org/browser-launcher2/-/browser-launcher2-0.4.3.tgz","integrity":"sha512-TKJJUZ8sHqI7l0hCeglEbFwzdgke/bmje3FgH9fjT00swFHqzWhhrYqKxBkP/fK6sNJueoN/Bc/Wi/FsZrSAgA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDs3qKh2L5tavOag9EubE1c/ZIFE92FxrjE9xpQzvQFPwIhAITXCSiKh+PAqPAtA4+jNXafRjwXjTI+cXb1E0uuWwnE"}]}},"0.4.4":{"name":"browser-launcher2","version":"0.4.4","description":"Detect, launch and stop browser versions","main":"index.js","scripts":{"lint":"jscs . && jshint index.js lib/ example/"},"directories":{"example":"example","res":"res"},"dependencies":{"headless":"^0.1.7","lodash":"^2.4.1","mkdirp":"^0.5.0","osenv":"^0.1.0","plist":"^1.0.1","win-detect-browsers":"^0.0.2","uid":"0.0.2","rimraf":"~2.2.8"},"repository":{"type":"git","url":"git://github.com/benderjs/browser-launcher2.git"},"homepage":"https://github.com/benderjs/browser-launcher2","keywords":["browser","headless","phantom","chrome","firefox","chromium","safari","ie","opera","osx","windows"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"contributors":[{"name":"CKSource","url":"http://cksource.com/"}],"license":"MIT","engine":{"node":">=0.8"},"devDependencies":{"jscs":"^1.5.8","jshint":"^2.5.2"},"gitHead":"66d3c3235eca1b708cf92f5d390e8412b1cb9040","bugs":{"url":"https://github.com/benderjs/browser-launcher2/issues"},"_id":"browser-launcher2@0.4.4","_shasum":"1e2b98ec9bc1c711084174d5b2c82598b5c0d1e4","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"cksource","email":"npm@cksource.com"},"maintainers":[{"name":"cksource","email":"npm@cksource.com"}],"dist":{"shasum":"1e2b98ec9bc1c711084174d5b2c82598b5c0d1e4","tarball":"https://registry.npmjs.org/browser-launcher2/-/browser-launcher2-0.4.4.tgz","integrity":"sha512-+IfucXm4HKDUQ78/vgr0bj1Dk0Lh0vi7HfPcml0fWaV5Bh/ITIIlwJjv7k64qaRbG8dfDB+/FCxq9UJFHBB2Bg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAzGZ97a9VPfNKYJEwndli4o0g3cE3UtKCI54zy0eaY5AiEArogbKByK8rMiodZGlzVNBcN3O9xkBAh+VBBHNgUa1Ug="}]}},"0.4.5":{"name":"browser-launcher2","version":"0.4.5","description":"Detect, launch and stop browser versions","main":"index.js","scripts":{"lint":"jscs . && jshint index.js lib/ example/"},"directories":{"example":"example","res":"res"},"dependencies":{"headless":"^0.1.7","lodash":"^2.4.1","mkdirp":"^0.5.0","osenv":"^0.1.0","plist":"^1.0.1","win-detect-browsers":"^1.0.1","uid":"0.0.2","rimraf":"~2.2.8"},"repository":{"type":"git","url":"git://github.com/benderjs/browser-launcher2.git"},"homepage":"https://github.com/benderjs/browser-launcher2","keywords":["browser","headless","phantom","chrome","firefox","chromium","safari","ie","opera","osx","windows"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"contributors":[{"name":"CKSource","url":"http://cksource.com/"}],"license":"MIT","engine":{"node":">=0.8"},"devDependencies":{"jscs":"^1.5.8","jshint":"^2.5.2"},"gitHead":"13924a4b50edc3038a0cccbd0a07b72733af9c01","bugs":{"url":"https://github.com/benderjs/browser-launcher2/issues"},"_id":"browser-launcher2@0.4.5","_shasum":"9b05fd5ead86a8931d20d5517e253d420882975a","_from":".","_npmVersion":"2.1.18","_nodeVersion":"0.10.35","_npmUser":{"name":"cksource","email":"npm@cksource.com"},"maintainers":[{"name":"cksource","email":"npm@cksource.com"}],"dist":{"shasum":"9b05fd5ead86a8931d20d5517e253d420882975a","tarball":"https://registry.npmjs.org/browser-launcher2/-/browser-launcher2-0.4.5.tgz","integrity":"sha512-kzJTv7WXylwQrGrIu7qIohUkiAagLpOL79wt8fdiUlVQsQPGpSX5nVDdl0Hj5ZqKK6CkQMh7N+CVRBwcqn4Z0w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH3ndnKpirlTsAqDhJGLBr2ipuA13W3XP4rCIXjR+TGDAiEAklpk5jGCjpYnbJHNid8SAIhIQgj0qeSYGJCYuMdDfdM="}]}},"0.4.6":{"name":"browser-launcher2","version":"0.4.6","description":"Detect, launch and stop browser versions","main":"index.js","scripts":{"lint":"jscs . && jshint index.js lib/ example/"},"directories":{"example":"example","res":"res"},"dependencies":{"headless":"^0.1.7","lodash":"^2.4.1","mkdirp":"^0.5.0","osenv":"^0.1.0","plist":"^1.0.1","win-detect-browsers":"^1.0.1","uid":"0.0.2","rimraf":"~2.2.8"},"repository":{"type":"git","url":"git://github.com/benderjs/browser-launcher2.git"},"homepage":"https://github.com/benderjs/browser-launcher2","keywords":["browser","headless","phantom","chrome","firefox","chromium","safari","ie","opera","osx","windows"],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"contributors":[{"name":"CKSource","url":"http://cksource.com/"}],"license":"MIT","engine":{"node":">=0.8"},"devDependencies":{"jscs":"^1.5.8","jshint":"^2.5.2"},"gitHead":"e7f7cc3fbd8dcacf4e42b2d48b238451984e9d5f","bugs":{"url":"https://github.com/benderjs/browser-launcher2/issues"},"_id":"browser-launcher2@0.4.6","_shasum":"51598408a13f4c9c5b20eba44554b2c0b0ae4074","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"cksource","email":"npm@cksource.com"},"dist":{"shasum":"51598408a13f4c9c5b20eba44554b2c0b0ae4074","tarball":"https://registry.npmjs.org/browser-launcher2/-/browser-launcher2-0.4.6.tgz","integrity":"sha512-MAFiao5+mnAqHJ2RaB68aIuwKFdQzyK6KDmk1QIkKQbqqD6zdfm6aM4D1jT+jtvoO0UkdIX1WvyjL0ghoybNOw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHhOpPW/h0N3fTXrMJfLJHLoRciIQbE5tmJhiP2U0/W+AiEAtHNRhiWO9iyebByXS5DXW8bEOmVRzqXj8Nal6MSiGhA="}]},"maintainers":[{"name":"cksource","email":"npm@cksource.com"}]}},"readme":"# browser-launcher2\n\n[![Get it on npm](https://nodei.co/npm/browser-launcher2.png?compact=true)](https://www.npmjs.org/package/browser-launcher2)\n\nDetect the browser versions available on your system and launch them in an\nisolated profile for automated testing purposes.\n\nYou can launch browsers headlessly (using [Xvfb](http://en.wikipedia.org/wiki/Xvfb) or with [PhantomJS](http://phantomjs.org/)) and set\nthe proxy configuration on the fly.\n\nIt's a fork of [substack/browser-launcher](https://github.com/substack/browser-launcher) repository which seems to be no longer maintained.\n\n## Differences from *browser-launcher*\n\n- contains fixes and pull requests for unresolved issues reported in original repository\n- `launcher.browsers` is an array of local browsers only, not an object as it was before\n- `launch` callback returns an `Instance` instead of a child process, see API section for more details\n- uses [win-detect-browsers](https://github.com/vweevers/win-detect-browsers) for browser detection on Windows\n- more browsers supported\n\n## Supported browsers\n\nThe goal for this module is to support all major browsers on every desktop platform.\n\nAt the moment, `browser-launcher2` supports following browsers on Windows, Unix and OS X:\n\n- Chrome\n- Chromium\n- Firefox\n- IE (Windows only)\n- Opera\n- Safari\n- PhantomJS\n\n## Install\n\n```\nnpm install browser-launcher2\n```\n\n## Example\n\n### Browser launch\n```js\nvar launcher = require( 'browser-launcher2' );\n\nlauncher( function( err, launch ) {\n\tif ( err ) {\n\t\treturn console.error( err );\n\t}\n\n\tlaunch( 'http://cksource.com/', 'chrome', function( err, instance ) {\n\t\tif ( err ) {\n\t\t\treturn console.error( err );\n\t\t}\n\n\t\tconsole.log( 'Instance started with PID:', instance.pid );\n\n\t\tinstance.on( 'stop', function( code ) {\n\t\t\tconsole.log( 'Instance stopped with exit code:', code );\n\t\t} );\n\t} );\n} );\n```\n\nOutputs:\n\n```\n$ node example/launch.js\nInstance started with PID: 12345\nInstance stopped with exit code: 0\n```\n\n### Browser detection\n```js\nvar launcher = require( '../' );\n\nlauncher.detect( function( available ) {\n\tconsole.log( 'Available browsers:' );\n\tconsole.dir( available );\n} );\n```\n\nOutputs:\n\n```bash\n$ node example/detect.js\nAvailable browsers:\n[ { name: 'chrome',\n\t\tversion: '36.0.1985.125',\n\t\ttype: 'chrome',\n\t\tcommand: 'google-chrome' },\n\t{ name: 'chromium',\n\t\tversion: '36.0.1985.125',\n\t\ttype: 'chrome',\n\t\tcommand: 'chromium-browser' },\n\t{ name: 'firefox',\n\t\tversion: '31.0',\n\t\ttype: 'firefox',\n\t\tcommand: 'firefox' },\n\t{ name: 'phantomjs',\n\t\tversion: '1.9.7',\n\t\ttype: 'phantom',\n\t\tcommand: 'phantomjs' },\n\t{ name: 'opera',\n\t\tversion: '12.16',\n\t\ttype: 'opera',\n\t\tcommand: 'opera' } ]\n```\n\n### Detaching the launched browser process from your script\n\nIf you want the opened browser to remain open after killing your script, first, you need to set `options.detached` to `true` (see the API). By default, killing your script will kill the opened browsers.\n\nThen, if you want your script to immediately return control to the shell, you may additionally call `unref` on the `instance` object in the callback:\n\n```js\nvar launcher = require('browser-launcher2');\nlauncher( function (err, launch) {\n\tlaunch( 'http://example.org/', {\n\t\tbrowser: 'chrome',\n\t\tdetached: true\n    }, function( err, instance ) {\n\t\tif ( err ) {\n\t\t\treturn console.error( err );\n\t\t}\n\n\t\tinstance.process.unref();\n\t\tinstance.process.stdin.unref();\n\t\tinstance.process.stdout.unref();\n\t\tinstance.process.stderr.unref();\n\t} );\n});\n```\n\n## API\n\n``` js\nvar launcher = require('browser-launcher2');\n```\n\n### `launcher([configPath], callback)`\n\nDetect available browsers and pass `launch` function to the callback.\n\n**Parameters:**\n- *String* `configPath` - path to a browser configuration file *(Optional)*\n- *Function* `callback(err, launch)` - function called with `launch` function and errors (if any)\n\n### `launch(uri, options, callback)`\n\nOpen given URI in a browser and return an instance of it.\n\n**Parameters:**\n- *String* `uri` - URI to open in a newly started browser\n- *Object|String* `options` - configuration options or name of a browser to launch\n- *String* `options.browser` - name of a browser to launch\n- *String* `options.version` - version of a browser to launch, if none was given, the highest available version will be launched\n- *Array* `options.options` - additional command line options\n- *String* `options.proxy` - URI of the proxy server\n- *Boolean* `options.detached` - if true, then killing your script will not kill the opened browser\n- *Boolean* `options.noProxy` - set proxy routes to skip over\n- *Boolean* `options.headless` - run a browser in a headless mode (only if **Xvfb** available)\n- *Function* `callback(err, instance)` - function fired when started a browser `instance` or an error occurred\n\n### `launch.browsers`\n\nThis property contains an array of all known and available browsers.\n\n### `instance`\n\nBrowser instance object.\n\n**Properties:**\n- *String* `command` - command used to start the instance\n- *Array* `args` - array of command line arguments used while starting the instance\n- *String* `image` - instance's image name\n- *String* `processName` - instance's process name\n- *Object* `process` - reference to instance's process started with Node's `child_process.spawn` API\n- *Number* `pid` - instance's process PID\n- *Stream* `stdout` - instance's process STDOUT stream\n- *Stream* `stderr` - instance's process STDERR stream\n\n**Events:**\n- `stop` - fired when instance stops\n\n**Methods:**\n- `stop(callback)` - stop the instance and fire the callback once stopped\n\n### `launcher.detect(callback)`\n\nDetects all browsers available.\n\n**Parameters:**\n- *Function* `callback(available)` - function called with array of all recognized browsers\n\nEach browser contains following properties:\n- `name` - name of a browser\n- `version` - browser's version\n- `type` - type of a browser i.e. browser's family\n- `command` - command used to launch a browser\n\n### `launcher.update([configFile], callback)`\n\nUpdates the browsers cache file (`~/.config/browser-launcher/config.json` is no `configFile` was given) and creates new profiles for found browsers.\n\n**Parameters:**\n- *String* `configFile` - path to the configuration file *Optional*\n- *Function* `callback(err, browsers)` - function called with found browsers and errors (if any)\n\n## Known Issues\n\n- IE8: after several starts and stops, if you manually open IE it will come up with a pop-up asking if we want to restore tabs (#21)\n- Chrome @ OSX: it's not possible to launch multiple instances of Chrome at once\n\n## License\n\nMIT\n","maintainers":[{"name":"cksource","email":"npm@cksource.com"}],"time":{"modified":"2022-06-13T05:09:27.891Z","created":"2014-08-08T13:37:29.405Z","0.4.0":"2014-08-08T13:37:29.405Z","0.4.1":"2014-08-08T13:48:03.270Z","0.4.2":"2014-09-10T09:45:46.133Z","0.4.3":"2014-09-23T11:39:23.848Z","0.4.4":"2014-11-28T10:05:22.538Z","0.4.5":"2015-04-17T08:11:47.480Z","0.4.6":"2015-08-20T06:26:35.452Z"},"homepage":"https://github.com/benderjs/browser-launcher2","keywords":["browser","headless","phantom","chrome","firefox","chromium","safari","ie","opera","osx","windows"],"repository":{"type":"git","url":"git://github.com/benderjs/browser-launcher2.git"},"contributors":[{"name":"CKSource","url":"http://cksource.com/"}],"author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"bugs":{"url":"https://github.com/benderjs/browser-launcher2/issues"},"license":"MIT","readmeFilename":"README.md"}