{"name":"saucelabs","version":"3.1.1","author":{"name":"Christian Bromann","email":"christian@saucelabs.com"},"description":"A wrapper around Sauce Labs REST API","homepage":"https://github.com/saucelabs/node-saucelabs","license":"Apache-2.0","contributors":[{"name":"wswebcreation","email":"wim@wswebcreation","url":"http://www.wswebcreation"},{"name":"christian-bromann","email":"christian@saucelabs.com"}],"repository":{"type":"git","url":"git://github.com/saucelabs/node-saucelabs.git"},"main":"./build/index","bin":{"sl":"bin/sl"},"typings":"./build/index.d.ts","scripts":{"build":"run-s clean compile","clean":"rm -rf ./build ./coverage","compile":"babel src -d build","eslint":"eslint ./src ./test","generate:docs":"babel-node ./scripts/generate-docs","generate:typings":"","prepublishOnly":"NODE_ENV=production run-s build generate:typings","release":"npm run release:patch","release:patch":"np patch","release:minor":"np minor","release:major":"np major","test":"run-s eslint test:unit","test:unit":"jest --coverage","watch":"npm run compile -- --watch"},"dependencies":{"change-case":"^3.1.0","form-data":"^3.0.0","hash.js":"^1.1.7","request":"^2.88.0","yargs":"^13.2.2"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.1.2","@babel/node":"^7.2.2","@babel/plugin-proposal-class-properties":"^7.1.0","@babel/plugin-proposal-export-default-from":"^7.0.0","@babel/plugin-proposal-function-bind":"^7.0.0","@babel/plugin-proposal-optional-catch-binding":"^7.2.0","@babel/plugin-syntax-export-default-from":"^7.0.0","@babel/preset-env":"^7.1.0","@babel/register":"^7.0.0","babel-core":"^7.0.0-bridge.0","babel-eslint":"^10.0.1","babel-jest":"^24.1.0","babel-plugin-source-map-support":"^2.0.1","codecov":"^3.0.0","eslint":"^4.7.2","eslint-plugin-import":"^2.8.0","jest":"^24.1.0","np":"^2.18.2","npm-run-all":"^4.1.5","prettier":"^1.18.2","rimraf":"^2.6.2","source-map-support":"^0.5.9","swagger-typescript-codegen":"^1.10.0"},"jest":{"testMatch":["<rootDir>/tests/**/*.test.js"],"coverageDirectory":"./coverage/","collectCoverage":true,"coverageThreshold":{"global":{"branches":95,"functions":100,"lines":97,"statements":97}},"testEnvironment":"node"},"readme":"<p align=\"center\">\n    <img src=\"./assets/trophy-bot.png\" alt=\"Trophy bot\" />\n</p>\n\n# Node Sauce Labs [![Build Status](https://travis-ci.org/saucelabs/node-saucelabs.svg?branch=master)](https://travis-ci.org/saucelabs/node-saucelabs)\n\nWrapper around the Sauce Labs REST APIs for [Node.js](http://nodejs.org/) (v8 or higher).\n\n## Install\n\nTo install the package run:\n\n```shell\nnpm install saucelabs\n```\n\n## Options\n\n### user\n\nYour Sauce Labs username.\n\nType: `string`<br>\nDefault: `process.env.SAUCE_USERNAME`\n\n### key\n\nYour Sauce Labs access key.\n\nType: `string`<br>\nDefault: `process.env.SAUCE_ACCESS_KEY`\n\n### region\n\nYour Sauce Labs datacenter region. The following regions are available:\n\n- `us-west-1` (short `us`)\n- `eu-central-1` (short `eu`)\n\nType: `string`<br>\nDefault: `us`\n\n### headless\n\nIf set to true you are accessing the headless Sauce instances (this discards the `region` option).\n\nType: `boolean`<br>\nDefault: `false`\n\n## Usage\n\nAll accessible API commands with descriptions can be found [here](docs/interface.md). In order to route requests through a proxy set `HTTP_PROXY`, `HTTPS_PROXY` or `NO_PROXY` as environment variable. For more information on this, read [here](https://github.com/request/request#controlling-proxy-behaviour-using-environment-variables). Alternatively you can pass the proxy to be used during initialization:\n\n```js\nimport SauceLabs from 'saucelabs';\n\n...\n\nconst myAccount = new SauceLabs({ proxy: 'http://localproxy.com' });\n```\n\n### As CLI Tool\n\nThis package if installed globally can be used as CLI tool to access the API from the command line:\n\n```sh\n$ npm install -g saucelabs\n...\n$ sl listJobs $SAUCE_USERNAME --limit 5 --region eu\n{ jobs:\n   [ { id: '19dab74f8fd848518f8d2c2cee3a6fbd' },\n     { id: 'dc08ca0c7fa14eee909a093d11567328' },\n     { id: '5bc6f70c777b4ae3bf7909a40f5ee41b' },\n     { id: 'f40fe7b044754eaaa5f5a130406549b5' },\n     { id: 'd1553f71f910402893f1e82a4dcb6ca6' } ] }\n```\n\nYou can find all available commands and options with description by calling:\n\n```sh\nsl --help\n# show description for specific command\nsl listJobs --help\n```\n\nor update the job status by calling:\n\n```sh\nsl updateJob cb-onboarding 690c5877710c422d8be4c622b40c747f \"{\\\"passed\\\":false}\"\n```\n\n### As NPM Package\n\nThe following example shows how to access details of the last job you were running with your account that is being exposed as environment variables as `SAUCE_USERNAME` and `SAUCE_ACCESS_KEY`. Alternatively you can pass the credentials via `options` to the constructor:\n\n```js\nimport SauceLabs from 'saucelabs';\n// if imports are not supported by your Node.js version, import the package as follows:\n// const SauceLabs = require('saucelabs').default;\n\n(async () => {\n    const myAccount = new SauceLabs();\n    // using constructor options\n    // const myAccount = new SauceLabs({ user: \"YOUR-USER\", key: \"YOUR-ACCESS-KEY\"});\n\n    // get job details of last run job\n    const job = await myAccount.listJobs(\n        process.env.SAUCE_USERNAME,\n        { limit: 1, full: true }\n    );\n\n    console.log(job);\n    /**\n     * outputs:\n     * { jobs:\n        [ { browser_short_version: '72',\n            video_url:\n             'https://assets.saucelabs.com/jobs/dc08ca0c7fa14eee909a093d11567328/video.flv',\n            creation_time: 1551711453,\n            'custom-data': null,\n            browser_version: '72.0.3626.81',\n            owner: '<username-redacted>',\n            id: 'dc08ca0c7fa14eee909a093d11567328',\n            record_screenshots: true,\n            record_video: true,\n            build: null,\n            passed: null,\n            public: 'team',\n            end_time: 1551711471,\n            status: 'complete',\n            log_url:\n             'https://assets.saucelabs.com/jobs/dc08ca0c7fa14eee909a093d11567328/selenium-server.log',\n            start_time: 1551711454,\n            proxied: false,\n            modification_time: 1551711471,\n            tags: [],\n            name: null,\n            commands_not_successful: 1,\n            consolidated_status: 'complete',\n            manual: false,\n            assigned_tunnel_id: null,\n            error: null,\n            os: 'Windows 2008',\n            breakpointed: null,\n            browser: 'googlechrome' } ] }\n     */\n})()\n```\n\n> You may wonder why `listJobs` requires a `username` as first parameter since you've already defined the process.env. The reason for this is that Sauce Labs supports a concept of Team Accounts, so-called sub-accounts, grouped together. As such functions like the mentioned could list jobs not only for the requesting account, but also for the individual team account. Learn more about it [here](https://wiki.saucelabs.com/display/DOCS/Managing+Team+Members+and+Accounts)\n\n## Breaking changes from v1 to v2\n\nPublic APIs have changed from v1 to v2. Methods in v1 accepted a `callback` trailing parameter which is no more available with v2, instead all methods now return a Promise which can be `awaited` or `then`'d.\n\nBelow, you can find the list of the mapped method names:\n\n| v1 | v2 |\n|----|----|\n| getAccountDetails(callback)   | async getUser(username) |\n| getAccountLimits(callback)   | ? |\n| getUserActivity(callback)   | async getUserActivity(username) |\n| getUserConcurrency(callback) | async getUserConcurrency(username) |\n| getAccountUsage(start, end, callback) | ? |\n| getJobs(callback) | async listJobs(username, { ...options }) // with option: full: true |\n| showJob(id, callback) | async getJob(username, id) |\n| showJobAssets(id, callback) | ? |\n| updateJob(id, data, callback) | async updateJob(username, id, body) |\n| stopJob(id, data, callback) | async stopJob(username, id) |\n| deleteJob(id, callback) | ? |\n| getActiveTunnels(callback) | async listAvailableTunnels(username) |\n| getTunnel(id, callback) | async getTunnel(username, id) |\n| deleteTunnel(id, callback) | async deleteTunnel(username, id) |\n| getServiceStatus(callback) |async getStatus() |\n| getBrowsers(callback) | ? |\n| getAllBrowsers(callback) | async listPlatforms(platform)  // pass \"all\" |\n| getSeleniumBrowsers(callback) | Selenium-RC no longer supported |\n| getWebDriverBrowsers(callback) | async listPlatforms(platform) // pass \"webdriver\" |\n| getTestCounter(callback) | ? |\n| updateSubAccount(data, callback) | ? |\n| deleteSubAccount(callback) | ? |\n| createSubAccount(data, callback) | ? |\n| createPublicLink(id, date, useHour, callback) | ? |\n| getSubAccountList(callback) | ? |\n| getSubAccounts(callback) | ? |\n\n## Test\n\nTo run the test suite, first invoke the following command within the repo, installing the development dependencies:\n\n```shell\nnpm install\n```\n\nThen run the tests:\n\n```shell\nnpm test\n```\n\n> This module was originally created by [Dan Jenkins](https://github.com/danjenkins) with the help of multiple contributors ([Daniel Perez Alvarez](https://github.com/unindented), [Mathieu Sabourin](https://github.com/OniOni), [Michael J Feher](https://github.com/PhearZero), and many more). We would like to thank Dan and all contributors for their support and this beautiful module.\n","readmeFilename":"README.md","gitHead":"a77191aa711fc6e3c8f0c20fc2faca1278771022","bugs":{"url":"https://github.com/saucelabs/node-saucelabs/issues"},"_id":"saucelabs@3.1.1","_nodeVersion":"10.19.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-kkrGVaU1TfwCM3uPnT+p8Nt08UDWclS3zq4wJoqjAcge9oTMw3i2ZRlqT/+/fJPYYBylgrMuZZme6VLLfx4ygA==","shasum":"cf75e2877d9fb15a96330a12403a1e1ea9813080","tarball":"http://registry-npm.ywwl.com/saucelabs/download/saucelabs-3.1.1.tgz","fileCount":23,"unpackedSize":240534,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeVn9YCRA9TVsSAnZWagAAR34P/RGmdr6RJLICQBn1/KnO\nU2jmVCAYTyUKLVBZ2Dkq7MaP2j8bFIBxfdCy8VJBoJbVWrGURB1QD0yzPDLU\n/FE2Xwa2Y2b5nmb3ZqLooZ9KCB/3KHd6dTsBb+GPSOhCIvh1JyFxG0pi4utO\nTaXknevRAsI4qGTufPiqmQyxr89+6lyqoQDP/vTdJXviNLfv6RgPwK2VJAVm\n0Llk1FuNjB/qA+fm2pXfqdROAMVacloc2D+j9P0Yji+Cm2X/MZWSQhs+e/s+\nXe3fDIn1OtmyWVU4EEWyb9B+KdbFqtvYmE7YqP8n6Aa+Ji/censnKyUd0lCG\nVX0cgcAb7YwbZSzxLsy01OsCQtDaQy//NBJqo5nimsElX27mw7u6V7gm4vB1\nEGjP6Vp0IkD15JPIZvzbizIDUGsGrsfFM7OjuMXyG0ibUZm4cerWFqBd/4nA\ndRM9R+m6g+ffaJzJQuFZziYNU7KJTYPdb6+7BpIlkSei/x8qacKutY/eqfII\nBM4FEEAQQslV8ig6UR3jWA1zWZpbn1htLtPLRhJPBdCShTkVcO6wQxjqwluv\nHArjt67FQq+IQbKmIEGkszo6YjHqL16CN198Za5edx2i5Fvej2mJVpWdg+w9\n4wp2fDi6SmrDaYqU795Sdq2EqMywJt3DftFxHJtan1TPUWIZcFKXTpFQK3Ec\nm1Ba\r\n=1L8h\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuyG5hcyW67s1qxv4Mi0nLv8+BtTaZZvQbJ5eO8KlykgIhAKvMxIQx+HX1QaydsLJyy+7wpNbCMnZYiH9oklA65cs9"}],"size":33767,"noattachment":false,"key":"/saucelabs/-/saucelabs-3.1.1.tgz"},"maintainers":[{"email":"christian@saucelabs.com","name":"christian-bromann"},{"email":"me@dan-jenkins.co.uk","name":"danjenkins"},{"email":"unindented@gmail.com","name":"unindented"},{"email":"wim@wswebcreation.nl","name":"wswebcreation-nl"}],"_npmUser":{"name":"christian-bromann","email":"christian@saucelabs.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/saucelabs_3.1.1_1582726999885_0.6235082927805993"},"_hasShrinkwrap":false,"deprecated":"broken release","publish_time":1582727000170,"_cnpm_publish_time":1582727000170,"dist-tags":{"beta":"2.0.0-beta.10","latest":"9.3.0","orchestrator-experiment":"3.1.1-alpha.7"}}