{"_id":"@belym.a.2105/sauce-connect-launcher","_rev":"3-7363e0ce00322d065b4b32ce7307fa40","name":"@belym.a.2105/sauce-connect-launcher","description":"A library to download and launch Sauce Connect.","dist-tags":{"latest":"1.2.0-git.201703300925","git":"1.2.0-git.201703300955"},"versions":{"1.2.0-git.201703300925":{"name":"@belym.a.2105/sauce-connect-launcher","description":"A library to download and launch Sauce Connect.","version":"1.2.0-git.201703300925","homepage":"https://github.com/bermi/sauce-connect-launcher","author":{"name":"Bermi Ferrer","email":"bermi@bermilabs.com"},"main":"lib/sauce-connect-launcher","license":"MIT","keywords":["selenium","sauce connect","sauce labs","testing","local tunnel"],"repository":{"type":"git","url":"git+https://github.com/bermi/sauce-connect-launcher.git"},"scripts":{"postinstall":"node scripts/install.js || nodejs scripts/install.js","test":"make test","version":"git add README.md","lint":"make lint"},"dependencies":{"adm-zip":"~0.4.3","async":"^2.1.2","https-proxy-agent":"~1.0.0","lodash":"^4.16.6","rimraf":"^2.5.4"},"devDependencies":{"colors":"~1.1.2","eslint-plugin-mocha":"^4.8.0","expect.js":"~0.3.1","grunt":"~0.4.1","grunt-cli":"~0.1.9","grunt-contrib-watch":"~0.6.1","grunt-eslint":"^19.0.0","grunt-notify":"~0.4.0","grunt-release":"~0.13.0","grunt-simple-mocha":"~0.4.0","mocha":"^3.1.2"},"engines":{"node":">= 4"},"sauceConnectLauncher":{"scVersion":"latest"},"gitHead":"3d0e0f680b523799062dde9dbe7b1ac15be4c8b6","bugs":{"url":"https://github.com/bermi/sauce-connect-launcher/issues"},"_id":"@belym.a.2105/sauce-connect-launcher@1.2.0-git.201703300925","_shasum":"30cc9ea0d8b637cb6c6604ae9c28a04a9ba241c0","_from":".","_npmVersion":"4.0.5","_nodeVersion":"7.4.0","_npmUser":{"name":"belym.a.2105","email":"belym.a.2105@gmail.com"},"dist":{"shasum":"30cc9ea0d8b637cb6c6604ae9c28a04a9ba241c0","tarball":"https://registry.npmjs.org/@belym.a.2105/sauce-connect-launcher/-/sauce-connect-launcher-1.2.0-git.201703300925.tgz","integrity":"sha512-++NBIsJ34hSK8F5xhp81RCO2QoO5MN9Ox4GaBjZBXBugI+o8JYFTelyASflbyHt8BWSJZEEzpQFfltuqVQzHRw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLpKt4kRN89gXNYtyBX1BuG3/T4fOQ21wZkXJO7fjpsQIgJtaxjNh0ElAzyXCXob/9uKMXAbXhS//IpP6/tJUwYrU="}]},"maintainers":[{"name":"belym.a.2105","email":"belym.a.2105@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/sauce-connect-launcher-1.2.0-git.201703300925.tgz_1490866266385_0.01578510389663279"}},"1.2.0-git.201703300955":{"name":"@belym.a.2105/sauce-connect-launcher","description":"A library to download and launch Sauce Connect.","version":"1.2.0-git.201703300955","homepage":"https://github.com/bermi/sauce-connect-launcher","author":{"name":"Bermi Ferrer","email":"bermi@bermilabs.com"},"main":"lib/sauce-connect-launcher","license":"MIT","keywords":["selenium","sauce connect","sauce labs","testing","local tunnel"],"repository":{"type":"git","url":"git+https://github.com/bermi/sauce-connect-launcher.git"},"scripts":{"postinstall":"node scripts/install.js || nodejs scripts/install.js","test":"make test","version":"git add README.md","lint":"make lint"},"dependencies":{"adm-zip":"~0.4.3","async":"^2.1.2","https-proxy-agent":"~1.0.0","lodash":"^4.16.6","rimraf":"^2.5.4"},"devDependencies":{"colors":"~1.1.2","eslint-plugin-mocha":"^4.8.0","expect.js":"~0.3.1","grunt":"~0.4.1","grunt-cli":"~0.1.9","grunt-contrib-watch":"~0.6.1","grunt-eslint":"^19.0.0","grunt-notify":"~0.4.0","grunt-release":"~0.13.0","grunt-simple-mocha":"~0.4.0","mocha":"^3.1.2"},"engines":{"node":">= 4"},"sauceConnectLauncher":{"scVersion":"latest"},"gitHead":"3d0e0f680b523799062dde9dbe7b1ac15be4c8b6","bugs":{"url":"https://github.com/bermi/sauce-connect-launcher/issues"},"_id":"@belym.a.2105/sauce-connect-launcher@1.2.0-git.201703300955","_shasum":"8b25e4a3a8ae860ce31689ff0eacddcf8b104425","_from":".","_npmVersion":"4.0.5","_nodeVersion":"7.4.0","_npmUser":{"name":"belym.a.2105","email":"belym.a.2105@gmail.com"},"dist":{"shasum":"8b25e4a3a8ae860ce31689ff0eacddcf8b104425","tarball":"https://registry.npmjs.org/@belym.a.2105/sauce-connect-launcher/-/sauce-connect-launcher-1.2.0-git.201703300955.tgz","integrity":"sha512-7fo0iboLdI036nQ86u3SStctaCd3TWKMnfqr7Ki4+O3GLzbNy1SCSHRWR+Y9Pn8kMK7mvCZ4lcq+7rmwP7xF8Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB+6Ak51LEwC0DsMdl5rq8m9Aln/7I1TY3dUd7wLEYUAAiAgW13sZ/LovnMZj01HhrNCuVU7HePs2ux5+9zJdxJAIg=="}]},"maintainers":[{"name":"belym.a.2105","email":"belym.a.2105@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/sauce-connect-launcher-1.2.0-git.201703300955.tgz_1490867747670_0.5880873589776456"}}},"readme":"# sauce-connect-launcher\r\n\r\n[![Build Status](https://api.travis-ci.org/bermi/sauce-connect-launcher.svg)](http://travis-ci.org/bermi/sauce-connect-launcher)  [![Dependency Status](https://david-dm.org/bermi/sauce-connect-launcher.svg)](https://david-dm.org/bermi/sauce-connect-launcher) [![](http://img.shields.io/npm/v/sauce-connect-launcher.svg) ![](http://img.shields.io/npm/dm/sauce-connect-launcher.svg)](https://www.npmjs.org/package/sauce-connect-launcher)\r\n\r\nA library to download and launch Sauce Connect.\r\n\r\n## Installation\r\n\r\n```sh\r\nnpm install sauce-connect-launcher\r\n```\r\n\r\nIf you wish to also download Sauce Connect at this stage, rather than on first run, use the `SAUCE_CONNECT_DOWNLOAD_ON_INSTALL` environment variable.\r\n\r\n```sh\r\nSAUCE_CONNECT_DOWNLOAD_ON_INSTALL=true npm install\r\n```\r\n\r\n## Usage\r\n\r\n\r\n### Simple Usage\r\n\r\n```javascript\r\nvar sauceConnectLauncher = require('sauce-connect-launcher');\r\n\r\nsauceConnectLauncher({\r\n  username: 'bermi',\r\n  accessKey: '12345678-1234-1234-1234-1234567890ab'\r\n}, function (err, sauceConnectProcess) {\r\n  if (err) {\r\n    console.error(err.message);\r\n    return;\r\n  }\r\n  console.log(\"Sauce Connect ready\");\r\n\r\n  sauceConnectProcess.close(function () {\r\n    console.log(\"Closed Sauce Connect process\");\r\n  })\r\n});\r\n```\r\n\r\n### Advanced Usage\r\n\r\n```javascript\r\n\r\nvar sauceConnectLauncher = require('sauce-connect-launcher'),\r\n  options = {\r\n\r\n    // Sauce Labs username.  You can also pass this through the\r\n    // SAUCE_USERNAME environment variable\r\n    username: 'bermi',\r\n\r\n    // Sauce Labs access key.  You can also pass this through the\r\n    // SAUCE_ACCESS_KEY environment variable\r\n    accessKey: '12345678-1234-1234-1234-1234567890ab',\r\n\r\n    // Log output from the `sc` process to stdout?\r\n    verbose: false,\r\n\r\n    // Enable verbose debugging (optional)\r\n    verboseDebugging: false,\r\n\r\n    // Together with verbose debugging will output HTTP headers as well (optional)\r\n    vv: false,\r\n\r\n    // Port on which Sauce Connect's Selenium relay will listen for\r\n    // requests. Default 4445. (optional)\r\n    port: null,\r\n\r\n    // Proxy host and port that Sauce Connect should use to connect to\r\n    // the Sauce Labs cloud. e.g. \"localhost:1234\" (optional)\r\n    proxy: null,\r\n\r\n    // Change sauce connect logfile location (optional)\r\n    logfile: null,\r\n\r\n    // Period to log statistics about HTTP traffic in seconds (optional)\r\n    logStats: null,\r\n\r\n    // Maximum size before which the logfile is rotated (optional)\r\n    maxLogsize: null,\r\n\r\n    // Set to true to perform checks to detect possible misconfiguration or problems (optional)\r\n    doctor: null,\r\n\r\n    // Identity the tunnel for concurrent tunnels (optional)\r\n    tunnelIdentifier: null,\r\n\r\n    // an array or comma-separated list of regexes whose matches\r\n    // will not go through the tunnel. (optional)\r\n    fastFailRegexps: null,\r\n\r\n    // an array or comma-separated list of domains that will not go\r\n    // through the tunnel. (optional)\r\n    directDomains: null,\r\n\r\n    // A function to optionally write sauce-connect-launcher log messages.\r\n    // e.g. `console.log`.  (optional)\r\n    logger: function (message) {},\r\n\r\n    // an optional suffix to be appended to the `readyFile` name.\r\n    // useful when running multiple tunnels on the same machine,\r\n    // such as in a continuous integration environment. (optional)\r\n    readyFileId: null,\r\n\r\n    // retry to establish a tunnel multiple times. (optional)\r\n    connectRetries: 0\r\n\r\n    // time to wait between connection retries in ms. (optional)\r\n    connectRetryTimeout: 2000\r\n\r\n    // retry to download the sauce connect archive multiple times. (optional)\r\n    downloadRetries: 0\r\n\r\n    // time to wait between download retries in ms. (optional)\r\n    downloadRetryTimeout: 1000\r\n\r\n    // path to a sauce connect executable (optional)\r\n    // by default the latest sauce connect version is downloaded\r\n    exe: null\r\n\r\n    // keep sc running after the node process exited, this means you need to close\r\n    // the process manually once you are done using the pidfile\r\n    // Attention: This only works with sc versions <= 4.3.16 and only on macOS and\r\n    // linux at the moment\r\n    detached: null\r\n\r\n    // specify a connect version instead of fetching the latest version, this currently\r\n    // does not support checksum verification\r\n    connectVersion: 'latest'\r\n  };\r\n\r\nsauceConnectLauncher(options, function (err, sauceConnectProcess) {\r\n  console.log(\"Started Sauce Connect Process\");\r\n  sauceConnectProcess.close(function () {\r\n    console.log(\"Closed Sauce Connect process\");\r\n  });\r\n});\r\n\r\n```\r\n\r\nAdditional Sauce Connect options not specified above can still be passed.  `additionalArg: \"foo\"` options will be converted to `--addtional-arg foo` args (camelCase to kebab-case). Additional option starting with dash `\"-additionalArg\": \"foo\"` will be passed as it is `-additionalArg foo`. Arrays will be `join()`ed (like `directDomains`) and boolean options will be passed as flags.  See [Sauce Connect's docs](https://docs.saucelabs.com/reference/sauce-connect/) for a full list of arguments.\r\n\r\n### Credentials\r\n\r\nYou can pass the Sauce Labs credentials as `SAUCE_USERNAME` and `SAUCE_ACCESS_KEY` environment variables. (reccommended)\r\n\r\nYou can also create a user.json file in your current working directory with the username and key\r\n\r\nuser.json\r\n```\r\n{\"username\": \"bermi\", \"accessKey\": \"12345678-1234-1234-1234-1234567890ab\"}\r\n```\r\n\r\n### Sauce Connect Version\r\n\r\nYou can override the default Sauce Connect version with the `SAUCE_CONNECT_VERSION` environment variable.\r\n\r\n```sh\r\n$ SAUCE_CONNECT_VERSION=4.2 node myTestApp.js\r\n```\r\n\r\n\r\n## Development\r\n\r\nClone the repository and run\r\n\r\n```\r\nmake setup\r\n```\r\n\r\nYou will be prompted for Sauce Labs credentials (used for testing).  Run\r\n```\r\nmake dev\r\n```\r\nto start the watcher.\r\n\r\n\r\n## Testing\r\n\r\n```\r\nnpm test\r\n```\r\n\r\nor\r\n\r\n```\r\nmake test\r\n```\r\n\r\n## Changelog\r\n\r\n### v1.2.0\r\n\r\n- Improved download error handling and configurable download retries (#114)\r\n- Catch errors starting with `ERROR:` from sc output (#108)\r\n\r\n### v1.1.1\r\n\r\n- Ensure sc dir is created before downloading the archive. (#107)\r\n\r\n### v1.1.0\r\n\r\n- Detached mode and configurable version as open. (#105)\r\n\r\n### v1.0.0\r\n\r\n- Remove support for Node 0.10 and 0.12. (#103)\r\n- Support for using a custom executable (#99)\r\n- Hide API key from logs (#97)\r\n- Configurable connection retries (#101)\r\n- Various fixes for the Windows (#68, #95, #98)\r\n- Unwatch ready file on close (#67)\r\n- Auto-fetch the latest sc version (#96)\r\n- Support vv option (#93)\r\n\r\n### v0.15.1\r\n\r\n- Add http/s proxy support for download. (#80, #83)\r\n\r\n### v0.14.0\r\n\r\n- Support older versions of tar with `xzf` flag\r\n- SauceConnect 4.3.16\r\n\r\n### v0.13.0\r\n\r\n- Sauce Connect version 4.3.11\r\n- Bug-fix: Correctly catch api errors and log a message\r\n\r\n### v0.12.0\r\n\r\n- Sauce Connect version 4.3.10\r\n- Updated dependencies\r\n\r\n### v0.11.0\r\n\r\n- Updating dependencies\r\n- Catching connection errors (#54)\r\n\r\n### v0.10.3\r\n- Handle another error log output (#35)\r\n\r\n### v0.10.2\r\n- Bumping default Sauce Connect version to 4.3.7 (#51)\r\n\r\n### v0.10.1\r\n- Fixed file omitted by gitignore\r\n\r\n### v0.10.0\r\n- Refactored options handling to allow for future Sauce Connect options\r\n\r\n### v0.9.3\r\n- Disabling troublesome download on install unless the\r\n  `SAUCE_CONNECT_DOWNLOAD_ON_INSTALL=true` env flag is used\r\n\r\n### v0.9.2\r\n- Handling errors reported as JSON (#43)\r\n\r\n### v0.9.1\r\n- Downloading on install only when installing globally or the\r\n  `SAUCE_CONNECT_DOWNLOAD_ON_INSTALL=true` environment variable is set (#42)\r\n  Either way, a failure on `npm postinstall` will not halt the installation\r\n  as lazy installation can still be performed.\r\n\r\n### v0.9.0\r\n- Bumping default Sauce Connect version to 4.3.5\r\n\r\n### v0.8.2\r\n- Removing linux binaries published by mistake\r\n\r\n### v0.8.1\r\n- Changed prepublish script to postinstall(#38)\r\n\r\n### v0.8.0\r\n- Add readyFile suffix option (#39/#41)\r\n\r\n### v0.7.1\r\n- Changed install script to prepublish (#37/#38)\r\n\r\n### v0.7.0\r\n- Downloading sc during \"npm install\" (#36)\r\n- Adding --verboseDebugging for passing the --verbose flag to sc (#33)\r\n\r\n### v0.6.0\r\n- Exposing more logging options (#32)\r\n\r\n### v0.5.2\r\n- Use Sauce Connect v4.3 by default (#31)\r\n\r\n### v0.5.1\r\n- Set execute bit after download (#29)\r\n\r\n### v0.5.0\r\n- Use Sauce Connect v4.2 by default\r\n- Allow run-time overriding of Sauce Connect Version (#25)\r\n- Always set and check execute permissions (#27)\r\n\r\n### v0.4.2\r\n- Obfuscate credentials in logger output (#23)\r\n\r\n### v0.4.1\r\n- Remove Mac binaries added by mistake\r\n\r\n### v0.4.0\r\n- Use Sauce Connect v4.1 with Heartbleed fixes (#22)\r\n\r\n### v0.3.3\r\n- Support node 0.8.x (#20)\r\n\r\n### v0.3.2\r\n- Properly execute permissions on Windows (#19)\r\n\r\n### v0.3.1\r\n- Set execute permissions after downloading (#17)\r\n\r\n### v0.3.0\r\n- Support Sauce Connect 4.0\r\n- Use `os.tmpdir()` for readyfile\r\n\r\n\r\n## License\r\n\r\n(The MIT License)\r\n\r\nCopyright (c) 2013 Bermi Ferrer &lt;bermi@bermilabs.com&gt;\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n'Software'), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n","maintainers":[{"name":"belym.a.2105","email":"belym.a.2105@gmail.com"}],"time":{"modified":"2022-06-12T15:10:01.419Z","created":"2017-03-30T09:31:07.169Z","1.2.0-git.201703300925":"2017-03-30T09:31:07.169Z","1.2.0-git.201703300955":"2017-03-30T09:55:49.650Z"},"homepage":"https://github.com/bermi/sauce-connect-launcher","keywords":["selenium","sauce connect","sauce labs","testing","local tunnel"],"repository":{"type":"git","url":"git+https://github.com/bermi/sauce-connect-launcher.git"},"author":{"name":"Bermi Ferrer","email":"bermi@bermilabs.com"},"bugs":{"url":"https://github.com/bermi/sauce-connect-launcher/issues"},"license":"MIT","readmeFilename":"README.md"}