├── .gitignore ├── cacert-2020-01-01.pem ├── index.js ├── package-lock.json ├── package.json ├── readme.MD ├── request.js └── test └── request.js /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | /tests/ 9 | 10 | # Diagnostic reports (https://nodejs.org/api/report.html) 11 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 12 | 13 | # Runtime data 14 | pids 15 | *.pid 16 | *.seed 17 | *.pid.lock 18 | 19 | # Directory for instrumented libs generated by jscoverage/JSCover 20 | lib-cov 21 | 22 | # Coverage directory used by tools like istanbul 23 | coverage 24 | *.lcov 25 | 26 | # nyc test coverage 27 | .nyc_output 28 | 29 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 30 | .grunt 31 | 32 | # Bower dependency directory (https://bower.io/) 33 | bower_components 34 | 35 | # node-waf configuration 36 | .lock-wscript 37 | 38 | # Compiled binary addons (https://nodejs.org/api/addons.html) 39 | build/Release 40 | 41 | # Dependency directories 42 | node_modules/ 43 | jspm_packages/ 44 | 45 | # TypeScript v1 declaration files 46 | typings/ 47 | 48 | # TypeScript cache 49 | *.tsbuildinfo 50 | 51 | # Optional npm cache directory 52 | .npm 53 | 54 | # Optional eslint cache 55 | .eslintcache 56 | 57 | # Microbundle cache 58 | .rpt2_cache/ 59 | .rts2_cache_cjs/ 60 | .rts2_cache_es/ 61 | .rts2_cache_umd/ 62 | 63 | # Optional REPL history 64 | .node_repl_history 65 | 66 | # Output of 'npm pack' 67 | *.tgz 68 | 69 | # Yarn Integrity file 70 | .yarn-integrity 71 | 72 | # dotenv environment variables file 73 | .env 74 | .env.test 75 | 76 | # parcel-bundler cache (https://parceljs.org/) 77 | .cache 78 | 79 | # Next.js build output 80 | .next 81 | 82 | # Nuxt.js build / generate output 83 | .nuxt 84 | dist 85 | 86 | # Gatsby files 87 | .cache/ 88 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 89 | # https://nextjs.org/blog/next-9-1#public-directory-support 90 | # public 91 | 92 | # vuepress build output 93 | .vuepress/dist 94 | 95 | # Serverless directories 96 | .serverless/ 97 | 98 | # FuseBox cache 99 | .fusebox/ 100 | 101 | # DynamoDB Local files 102 | .dynamodb/ 103 | 104 | # TernJS port file 105 | .tern-port 106 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /** 4 | * Slight adaptation for request-curl 5 | * Based on request.js 6 | */ 7 | 8 | 9 | const extend = require('extend') 10 | const tough = require("tough-cookie") 11 | 12 | 13 | function initParams(uri, options) { 14 | const params = {} 15 | 16 | if (options !== null && typeof options === 'object') { 17 | extend(params, options, { uri: uri }) 18 | } else if (typeof uri === 'string') { 19 | extend(params, { uri: uri }) 20 | } else { 21 | extend(params, uri) 22 | } 23 | 24 | return params 25 | } 26 | 27 | 28 | function Request(uri, options) { 29 | if (typeof uri === 'undefined') { 30 | throw new Error('undefined is not a valid uri or options object.') 31 | } 32 | 33 | const params = initParams(uri, options) 34 | 35 | return new Request.Request(params) 36 | } 37 | 38 | Request.get = verbFunc('get') 39 | Request.head = verbFunc('head') 40 | Request.options = verbFunc('options') 41 | Request.post = verbFunc('post') 42 | Request.put = verbFunc('put') 43 | Request.patch = verbFunc('patch') 44 | Request.del = verbFunc('delete') 45 | Request.delete = verbFunc('delete') 46 | 47 | Request.jar = function () { 48 | return new tough.CookieJar() 49 | } 50 | 51 | function verbFunc(verb) { 52 | const method = verb.toUpperCase() 53 | return function (uri, options) { 54 | const params = initParams(uri, options) 55 | params.method = method 56 | 57 | return Request(params) 58 | } 59 | } 60 | 61 | function wrapRequestMethod(method, options, requester, verb) { 62 | return function (uri, opts) { 63 | const params = initParams(uri, opts) 64 | const target = {} 65 | 66 | extend(true, target, options, params) 67 | 68 | if (verb) { 69 | target.method = verb.toUpperCase() 70 | } 71 | 72 | if (typeof request === 'function') { 73 | method = requester 74 | } 75 | 76 | return method(target) 77 | } 78 | } 79 | 80 | Request.defaults = function (options, requester) { 81 | const self = this 82 | 83 | options = options || {} 84 | 85 | if (typeof options === 'function') { 86 | requester = options 87 | options = {} 88 | } 89 | 90 | const defaults = wrapRequestMethod(self, options, requester) 91 | 92 | const verbs = ['get', 'head', 'post', 'put', 'patch', 'del', 'delete'] 93 | verbs.forEach(function (verb) { 94 | defaults[verb] = wrapRequestMethod(self[verb], options, requester, verb) 95 | }) 96 | 97 | defaults.defaults = self.defaults 98 | defaults.jar = self.jar 99 | 100 | return defaults 101 | } 102 | 103 | 104 | module.exports = Request 105 | Request.Request = require('./request') -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "request-curl-v2", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "abbrev": { 8 | "version": "1.1.1", 9 | "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", 10 | "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" 11 | }, 12 | "ajv": { 13 | "version": "6.12.2", 14 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", 15 | "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==", 16 | "requires": { 17 | "fast-deep-equal": "^3.1.1", 18 | "fast-json-stable-stringify": "^2.0.0", 19 | "json-schema-traverse": "^0.4.1", 20 | "uri-js": "^4.2.2" 21 | } 22 | }, 23 | "ansi-regex": { 24 | "version": "2.1.1", 25 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", 26 | "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" 27 | }, 28 | "aproba": { 29 | "version": "1.2.0", 30 | "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", 31 | "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" 32 | }, 33 | "are-we-there-yet": { 34 | "version": "1.1.5", 35 | "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", 36 | "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", 37 | "requires": { 38 | "delegates": "^1.0.0", 39 | "readable-stream": "^2.0.6" 40 | } 41 | }, 42 | "array-filter": { 43 | "version": "1.0.0", 44 | "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz", 45 | "integrity": "sha1-uveeYubvTCpMC4MSMtr/7CUfnYM=", 46 | "dev": true 47 | }, 48 | "asn1": { 49 | "version": "0.2.4", 50 | "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", 51 | "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", 52 | "requires": { 53 | "safer-buffer": "~2.1.0" 54 | } 55 | }, 56 | "assert": { 57 | "version": "2.0.0", 58 | "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz", 59 | "integrity": "sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==", 60 | "dev": true, 61 | "requires": { 62 | "es6-object-assign": "^1.1.0", 63 | "is-nan": "^1.2.1", 64 | "object-is": "^1.0.1", 65 | "util": "^0.12.0" 66 | } 67 | }, 68 | "assert-plus": { 69 | "version": "1.0.0", 70 | "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", 71 | "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" 72 | }, 73 | "asynckit": { 74 | "version": "0.4.0", 75 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 76 | "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" 77 | }, 78 | "available-typed-arrays": { 79 | "version": "1.0.2", 80 | "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz", 81 | "integrity": "sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ==", 82 | "dev": true, 83 | "requires": { 84 | "array-filter": "^1.0.0" 85 | } 86 | }, 87 | "aws-sign2": { 88 | "version": "0.7.0", 89 | "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", 90 | "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" 91 | }, 92 | "aws4": { 93 | "version": "1.9.1", 94 | "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz", 95 | "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==" 96 | }, 97 | "balanced-match": { 98 | "version": "1.0.0", 99 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 100 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" 101 | }, 102 | "bcrypt-pbkdf": { 103 | "version": "1.0.2", 104 | "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", 105 | "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", 106 | "requires": { 107 | "tweetnacl": "^0.14.3" 108 | } 109 | }, 110 | "brace-expansion": { 111 | "version": "1.1.11", 112 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 113 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 114 | "requires": { 115 | "balanced-match": "^1.0.0", 116 | "concat-map": "0.0.1" 117 | } 118 | }, 119 | "caseless": { 120 | "version": "0.12.0", 121 | "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", 122 | "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" 123 | }, 124 | "chownr": { 125 | "version": "1.1.4", 126 | "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", 127 | "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" 128 | }, 129 | "code-point-at": { 130 | "version": "1.1.0", 131 | "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", 132 | "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" 133 | }, 134 | "combined-stream": { 135 | "version": "1.0.8", 136 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 137 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 138 | "requires": { 139 | "delayed-stream": "~1.0.0" 140 | } 141 | }, 142 | "concat-map": { 143 | "version": "0.0.1", 144 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 145 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" 146 | }, 147 | "console-control-strings": { 148 | "version": "1.1.0", 149 | "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", 150 | "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" 151 | }, 152 | "core-util-is": { 153 | "version": "1.0.2", 154 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", 155 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" 156 | }, 157 | "dashdash": { 158 | "version": "1.14.1", 159 | "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", 160 | "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", 161 | "requires": { 162 | "assert-plus": "^1.0.0" 163 | } 164 | }, 165 | "debug": { 166 | "version": "3.2.6", 167 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", 168 | "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", 169 | "requires": { 170 | "ms": "^2.1.1" 171 | } 172 | }, 173 | "declare.js": { 174 | "version": "0.0.8", 175 | "resolved": "https://registry.npmjs.org/declare.js/-/declare.js-0.0.8.tgz", 176 | "integrity": "sha1-BHit/5VkwAT1Hfc9i8E0AZ0o3N4=" 177 | }, 178 | "deep-extend": { 179 | "version": "0.6.0", 180 | "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", 181 | "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" 182 | }, 183 | "define-properties": { 184 | "version": "1.1.3", 185 | "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", 186 | "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", 187 | "dev": true, 188 | "requires": { 189 | "object-keys": "^1.0.12" 190 | } 191 | }, 192 | "delayed-stream": { 193 | "version": "1.0.0", 194 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 195 | "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" 196 | }, 197 | "delegates": { 198 | "version": "1.0.0", 199 | "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", 200 | "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" 201 | }, 202 | "detect-libc": { 203 | "version": "1.0.3", 204 | "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", 205 | "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" 206 | }, 207 | "ecc-jsbn": { 208 | "version": "0.1.2", 209 | "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", 210 | "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", 211 | "requires": { 212 | "jsbn": "~0.1.0", 213 | "safer-buffer": "^2.1.0" 214 | } 215 | }, 216 | "env-paths": { 217 | "version": "2.2.0", 218 | "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.0.tgz", 219 | "integrity": "sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA==" 220 | }, 221 | "es-abstract": { 222 | "version": "1.17.5", 223 | "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", 224 | "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", 225 | "dev": true, 226 | "requires": { 227 | "es-to-primitive": "^1.2.1", 228 | "function-bind": "^1.1.1", 229 | "has": "^1.0.3", 230 | "has-symbols": "^1.0.1", 231 | "is-callable": "^1.1.5", 232 | "is-regex": "^1.0.5", 233 | "object-inspect": "^1.7.0", 234 | "object-keys": "^1.1.1", 235 | "object.assign": "^4.1.0", 236 | "string.prototype.trimleft": "^2.1.1", 237 | "string.prototype.trimright": "^2.1.1" 238 | } 239 | }, 240 | "es-to-primitive": { 241 | "version": "1.2.1", 242 | "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", 243 | "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", 244 | "dev": true, 245 | "requires": { 246 | "is-callable": "^1.1.4", 247 | "is-date-object": "^1.0.1", 248 | "is-symbol": "^1.0.2" 249 | } 250 | }, 251 | "es6-object-assign": { 252 | "version": "1.1.0", 253 | "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", 254 | "integrity": "sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw=", 255 | "dev": true 256 | }, 257 | "extend": { 258 | "version": "3.0.2", 259 | "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", 260 | "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" 261 | }, 262 | "extended": { 263 | "version": "0.0.6", 264 | "resolved": "https://registry.npmjs.org/extended/-/extended-0.0.6.tgz", 265 | "integrity": "sha1-f7i/e52uOXWG5IVwrP1kLHjlBmk=", 266 | "requires": { 267 | "extender": "~0.0.5" 268 | } 269 | }, 270 | "extender": { 271 | "version": "0.0.10", 272 | "resolved": "https://registry.npmjs.org/extender/-/extender-0.0.10.tgz", 273 | "integrity": "sha1-WJwHSCvmGhRgttgfnCSqZ+jzJM0=", 274 | "requires": { 275 | "declare.js": "~0.0.4" 276 | } 277 | }, 278 | "extsprintf": { 279 | "version": "1.3.0", 280 | "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", 281 | "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" 282 | }, 283 | "fast-deep-equal": { 284 | "version": "3.1.1", 285 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", 286 | "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==" 287 | }, 288 | "fast-json-stable-stringify": { 289 | "version": "2.1.0", 290 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", 291 | "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" 292 | }, 293 | "foreach": { 294 | "version": "2.0.5", 295 | "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", 296 | "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", 297 | "dev": true 298 | }, 299 | "forever-agent": { 300 | "version": "0.6.1", 301 | "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", 302 | "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" 303 | }, 304 | "form-data": { 305 | "version": "2.3.3", 306 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", 307 | "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", 308 | "requires": { 309 | "asynckit": "^0.4.0", 310 | "combined-stream": "^1.0.6", 311 | "mime-types": "^2.1.12" 312 | } 313 | }, 314 | "fs-minipass": { 315 | "version": "1.2.7", 316 | "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", 317 | "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", 318 | "requires": { 319 | "minipass": "^2.6.0" 320 | } 321 | }, 322 | "fs.realpath": { 323 | "version": "1.0.0", 324 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 325 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" 326 | }, 327 | "function-bind": { 328 | "version": "1.1.1", 329 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 330 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", 331 | "dev": true 332 | }, 333 | "gauge": { 334 | "version": "2.7.4", 335 | "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", 336 | "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", 337 | "requires": { 338 | "aproba": "^1.0.3", 339 | "console-control-strings": "^1.0.0", 340 | "has-unicode": "^2.0.0", 341 | "object-assign": "^4.1.0", 342 | "signal-exit": "^3.0.0", 343 | "string-width": "^1.0.1", 344 | "strip-ansi": "^3.0.1", 345 | "wide-align": "^1.1.0" 346 | } 347 | }, 348 | "getpass": { 349 | "version": "0.1.7", 350 | "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", 351 | "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", 352 | "requires": { 353 | "assert-plus": "^1.0.0" 354 | } 355 | }, 356 | "glob": { 357 | "version": "7.1.6", 358 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", 359 | "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", 360 | "requires": { 361 | "fs.realpath": "^1.0.0", 362 | "inflight": "^1.0.4", 363 | "inherits": "2", 364 | "minimatch": "^3.0.4", 365 | "once": "^1.3.0", 366 | "path-is-absolute": "^1.0.0" 367 | } 368 | }, 369 | "graceful-fs": { 370 | "version": "4.2.4", 371 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", 372 | "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" 373 | }, 374 | "har-schema": { 375 | "version": "2.0.0", 376 | "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", 377 | "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" 378 | }, 379 | "har-validator": { 380 | "version": "5.1.3", 381 | "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", 382 | "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", 383 | "requires": { 384 | "ajv": "^6.5.5", 385 | "har-schema": "^2.0.0" 386 | } 387 | }, 388 | "has": { 389 | "version": "1.0.3", 390 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 391 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 392 | "dev": true, 393 | "requires": { 394 | "function-bind": "^1.1.1" 395 | } 396 | }, 397 | "has-symbols": { 398 | "version": "1.0.1", 399 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", 400 | "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", 401 | "dev": true 402 | }, 403 | "has-unicode": { 404 | "version": "2.0.1", 405 | "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", 406 | "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" 407 | }, 408 | "http-signature": { 409 | "version": "1.2.0", 410 | "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", 411 | "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", 412 | "requires": { 413 | "assert-plus": "^1.0.0", 414 | "jsprim": "^1.2.2", 415 | "sshpk": "^1.7.0" 416 | } 417 | }, 418 | "iconv-lite": { 419 | "version": "0.4.24", 420 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 421 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 422 | "requires": { 423 | "safer-buffer": ">= 2.1.2 < 3" 424 | } 425 | }, 426 | "ignore-walk": { 427 | "version": "3.0.3", 428 | "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz", 429 | "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==", 430 | "requires": { 431 | "minimatch": "^3.0.4" 432 | } 433 | }, 434 | "inflight": { 435 | "version": "1.0.6", 436 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 437 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 438 | "requires": { 439 | "once": "^1.3.0", 440 | "wrappy": "1" 441 | } 442 | }, 443 | "inherits": { 444 | "version": "2.0.4", 445 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 446 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 447 | }, 448 | "ini": { 449 | "version": "1.3.5", 450 | "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", 451 | "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" 452 | }, 453 | "is-arguments": { 454 | "version": "1.0.4", 455 | "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", 456 | "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", 457 | "dev": true 458 | }, 459 | "is-callable": { 460 | "version": "1.1.5", 461 | "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", 462 | "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", 463 | "dev": true 464 | }, 465 | "is-date-object": { 466 | "version": "1.0.2", 467 | "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", 468 | "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", 469 | "dev": true 470 | }, 471 | "is-fullwidth-code-point": { 472 | "version": "1.0.0", 473 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", 474 | "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", 475 | "requires": { 476 | "number-is-nan": "^1.0.0" 477 | } 478 | }, 479 | "is-generator-function": { 480 | "version": "1.0.7", 481 | "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.7.tgz", 482 | "integrity": "sha512-YZc5EwyO4f2kWCax7oegfuSr9mFz1ZvieNYBEjmukLxgXfBUbxAWGVF7GZf0zidYtoBl3WvC07YK0wT76a+Rtw==", 483 | "dev": true 484 | }, 485 | "is-nan": { 486 | "version": "1.3.0", 487 | "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.0.tgz", 488 | "integrity": "sha512-z7bbREymOqt2CCaZVly8aC4ML3Xhfi0ekuOnjO2L8vKdl+CttdVoGZQhd4adMFAsxQ5VeRVwORs4tU8RH+HFtQ==", 489 | "dev": true, 490 | "requires": { 491 | "define-properties": "^1.1.3" 492 | } 493 | }, 494 | "is-regex": { 495 | "version": "1.0.5", 496 | "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", 497 | "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", 498 | "dev": true, 499 | "requires": { 500 | "has": "^1.0.3" 501 | } 502 | }, 503 | "is-symbol": { 504 | "version": "1.0.3", 505 | "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", 506 | "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", 507 | "dev": true, 508 | "requires": { 509 | "has-symbols": "^1.0.1" 510 | } 511 | }, 512 | "is-typed-array": { 513 | "version": "1.1.3", 514 | "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.3.tgz", 515 | "integrity": "sha512-BSYUBOK/HJibQ30wWkWold5txYwMUXQct9YHAQJr8fSwvZoiglcqB0pd7vEN23+Tsi9IUEjztdOSzl4qLVYGTQ==", 516 | "dev": true, 517 | "requires": { 518 | "available-typed-arrays": "^1.0.0", 519 | "es-abstract": "^1.17.4", 520 | "foreach": "^2.0.5", 521 | "has-symbols": "^1.0.1" 522 | } 523 | }, 524 | "is-typedarray": { 525 | "version": "1.0.0", 526 | "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", 527 | "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" 528 | }, 529 | "isarray": { 530 | "version": "1.0.0", 531 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 532 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" 533 | }, 534 | "isexe": { 535 | "version": "2.0.0", 536 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 537 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" 538 | }, 539 | "isstream": { 540 | "version": "0.1.2", 541 | "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", 542 | "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" 543 | }, 544 | "jsbn": { 545 | "version": "0.1.1", 546 | "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", 547 | "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" 548 | }, 549 | "json-schema": { 550 | "version": "0.2.3", 551 | "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", 552 | "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" 553 | }, 554 | "json-schema-traverse": { 555 | "version": "0.4.1", 556 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", 557 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" 558 | }, 559 | "json-stringify-safe": { 560 | "version": "5.0.1", 561 | "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", 562 | "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" 563 | }, 564 | "jsprim": { 565 | "version": "1.4.1", 566 | "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", 567 | "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", 568 | "requires": { 569 | "assert-plus": "1.0.0", 570 | "extsprintf": "1.3.0", 571 | "json-schema": "0.2.3", 572 | "verror": "1.10.0" 573 | } 574 | }, 575 | "mime-db": { 576 | "version": "1.44.0", 577 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", 578 | "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" 579 | }, 580 | "mime-types": { 581 | "version": "2.1.27", 582 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", 583 | "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", 584 | "requires": { 585 | "mime-db": "1.44.0" 586 | } 587 | }, 588 | "minimatch": { 589 | "version": "3.0.4", 590 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 591 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 592 | "requires": { 593 | "brace-expansion": "^1.1.7" 594 | } 595 | }, 596 | "minimist": { 597 | "version": "1.2.5", 598 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", 599 | "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" 600 | }, 601 | "minipass": { 602 | "version": "2.9.0", 603 | "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", 604 | "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", 605 | "requires": { 606 | "safe-buffer": "^5.1.2", 607 | "yallist": "^3.0.0" 608 | } 609 | }, 610 | "minizlib": { 611 | "version": "1.3.3", 612 | "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", 613 | "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", 614 | "requires": { 615 | "minipass": "^2.9.0" 616 | } 617 | }, 618 | "mkdirp": { 619 | "version": "0.5.5", 620 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", 621 | "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", 622 | "requires": { 623 | "minimist": "^1.2.5" 624 | } 625 | }, 626 | "ms": { 627 | "version": "2.1.2", 628 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 629 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 630 | }, 631 | "nan": { 632 | "version": "2.14.0", 633 | "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", 634 | "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" 635 | }, 636 | "needle": { 637 | "version": "2.4.1", 638 | "resolved": "https://registry.npmjs.org/needle/-/needle-2.4.1.tgz", 639 | "integrity": "sha512-x/gi6ijr4B7fwl6WYL9FwlCvRQKGlUNvnceho8wxkwXqN8jvVmmmATTmZPRRG7b/yC1eode26C2HO9jl78Du9g==", 640 | "requires": { 641 | "debug": "^3.2.6", 642 | "iconv-lite": "^0.4.4", 643 | "sax": "^1.2.4" 644 | } 645 | }, 646 | "node-gyp": { 647 | "version": "5.1.0", 648 | "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-5.1.0.tgz", 649 | "integrity": "sha512-OUTryc5bt/P8zVgNUmC6xdXiDJxLMAW8cF5tLQOT9E5sOQj+UeQxnnPy74K3CLCa/SOjjBlbuzDLR8ANwA+wmw==", 650 | "requires": { 651 | "env-paths": "^2.2.0", 652 | "glob": "^7.1.4", 653 | "graceful-fs": "^4.2.2", 654 | "mkdirp": "^0.5.1", 655 | "nopt": "^4.0.1", 656 | "npmlog": "^4.1.2", 657 | "request": "^2.88.0", 658 | "rimraf": "^2.6.3", 659 | "semver": "^5.7.1", 660 | "tar": "^4.4.12", 661 | "which": "^1.3.1" 662 | } 663 | }, 664 | "node-libcurl": { 665 | "version": "2.1.1", 666 | "resolved": "https://registry.npmjs.org/node-libcurl/-/node-libcurl-2.1.1.tgz", 667 | "integrity": "sha512-HZDv4vtO5D3d7/bRcimHykdQfyp6rjcit3s63s9LvhFIRVI0IWqFf5VnuEEoBv4KitISU/IrYhYbgqakKQ+hhA==", 668 | "requires": { 669 | "env-paths": "2.2.0", 670 | "nan": "2.14.0", 671 | "node-gyp": "5.1.0", 672 | "node-pre-gyp": "0.14.0", 673 | "npmlog": "4.1.2", 674 | "tslib": "^1.11.1" 675 | } 676 | }, 677 | "node-pre-gyp": { 678 | "version": "0.14.0", 679 | "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz", 680 | "integrity": "sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA==", 681 | "requires": { 682 | "detect-libc": "^1.0.2", 683 | "mkdirp": "^0.5.1", 684 | "needle": "^2.2.1", 685 | "nopt": "^4.0.1", 686 | "npm-packlist": "^1.1.6", 687 | "npmlog": "^4.0.2", 688 | "rc": "^1.2.7", 689 | "rimraf": "^2.6.1", 690 | "semver": "^5.3.0", 691 | "tar": "^4.4.2" 692 | } 693 | }, 694 | "nopt": { 695 | "version": "4.0.3", 696 | "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", 697 | "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", 698 | "requires": { 699 | "abbrev": "1", 700 | "osenv": "^0.1.4" 701 | } 702 | }, 703 | "npm-bundled": { 704 | "version": "1.1.1", 705 | "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.1.tgz", 706 | "integrity": "sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==", 707 | "requires": { 708 | "npm-normalize-package-bin": "^1.0.1" 709 | } 710 | }, 711 | "npm-normalize-package-bin": { 712 | "version": "1.0.1", 713 | "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", 714 | "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==" 715 | }, 716 | "npm-packlist": { 717 | "version": "1.4.8", 718 | "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz", 719 | "integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==", 720 | "requires": { 721 | "ignore-walk": "^3.0.1", 722 | "npm-bundled": "^1.0.1", 723 | "npm-normalize-package-bin": "^1.0.1" 724 | } 725 | }, 726 | "npmlog": { 727 | "version": "4.1.2", 728 | "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", 729 | "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", 730 | "requires": { 731 | "are-we-there-yet": "~1.1.2", 732 | "console-control-strings": "~1.1.0", 733 | "gauge": "~2.7.3", 734 | "set-blocking": "~2.0.0" 735 | } 736 | }, 737 | "number-is-nan": { 738 | "version": "1.0.1", 739 | "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", 740 | "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" 741 | }, 742 | "oauth-sign": { 743 | "version": "0.9.0", 744 | "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", 745 | "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" 746 | }, 747 | "object-assign": { 748 | "version": "4.1.1", 749 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 750 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" 751 | }, 752 | "object-inspect": { 753 | "version": "1.7.0", 754 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", 755 | "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", 756 | "dev": true 757 | }, 758 | "object-is": { 759 | "version": "1.1.2", 760 | "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.2.tgz", 761 | "integrity": "sha512-5lHCz+0uufF6wZ7CRFWJN3hp8Jqblpgve06U5CMQ3f//6iDjPr2PEo9MWCjEssDsa+UZEL4PkFpr+BMop6aKzQ==", 762 | "dev": true, 763 | "requires": { 764 | "define-properties": "^1.1.3", 765 | "es-abstract": "^1.17.5" 766 | } 767 | }, 768 | "object-keys": { 769 | "version": "1.1.1", 770 | "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", 771 | "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", 772 | "dev": true 773 | }, 774 | "object.assign": { 775 | "version": "4.1.0", 776 | "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", 777 | "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", 778 | "dev": true, 779 | "requires": { 780 | "define-properties": "^1.1.2", 781 | "function-bind": "^1.1.1", 782 | "has-symbols": "^1.0.0", 783 | "object-keys": "^1.0.11" 784 | } 785 | }, 786 | "once": { 787 | "version": "1.4.0", 788 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 789 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 790 | "requires": { 791 | "wrappy": "1" 792 | } 793 | }, 794 | "os-homedir": { 795 | "version": "1.0.2", 796 | "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", 797 | "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" 798 | }, 799 | "os-tmpdir": { 800 | "version": "1.0.2", 801 | "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", 802 | "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" 803 | }, 804 | "osenv": { 805 | "version": "0.1.5", 806 | "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", 807 | "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", 808 | "requires": { 809 | "os-homedir": "^1.0.0", 810 | "os-tmpdir": "^1.0.0" 811 | } 812 | }, 813 | "path-is-absolute": { 814 | "version": "1.0.1", 815 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 816 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" 817 | }, 818 | "performance-now": { 819 | "version": "2.1.0", 820 | "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", 821 | "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" 822 | }, 823 | "process-nextick-args": { 824 | "version": "2.0.1", 825 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", 826 | "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" 827 | }, 828 | "psl": { 829 | "version": "1.8.0", 830 | "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", 831 | "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" 832 | }, 833 | "punycode": { 834 | "version": "2.1.1", 835 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 836 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" 837 | }, 838 | "qs": { 839 | "version": "6.5.2", 840 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", 841 | "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" 842 | }, 843 | "rc": { 844 | "version": "1.2.8", 845 | "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", 846 | "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", 847 | "requires": { 848 | "deep-extend": "^0.6.0", 849 | "ini": "~1.3.0", 850 | "minimist": "^1.2.0", 851 | "strip-json-comments": "~2.0.1" 852 | } 853 | }, 854 | "readable-stream": { 855 | "version": "2.3.7", 856 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", 857 | "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", 858 | "requires": { 859 | "core-util-is": "~1.0.0", 860 | "inherits": "~2.0.3", 861 | "isarray": "~1.0.0", 862 | "process-nextick-args": "~2.0.0", 863 | "safe-buffer": "~5.1.1", 864 | "string_decoder": "~1.1.1", 865 | "util-deprecate": "~1.0.1" 866 | } 867 | }, 868 | "request": { 869 | "version": "2.88.2", 870 | "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", 871 | "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", 872 | "requires": { 873 | "aws-sign2": "~0.7.0", 874 | "aws4": "^1.8.0", 875 | "caseless": "~0.12.0", 876 | "combined-stream": "~1.0.6", 877 | "extend": "~3.0.2", 878 | "forever-agent": "~0.6.1", 879 | "form-data": "~2.3.2", 880 | "har-validator": "~5.1.3", 881 | "http-signature": "~1.2.0", 882 | "is-typedarray": "~1.0.0", 883 | "isstream": "~0.1.2", 884 | "json-stringify-safe": "~5.0.1", 885 | "mime-types": "~2.1.19", 886 | "oauth-sign": "~0.9.0", 887 | "performance-now": "^2.1.0", 888 | "qs": "~6.5.2", 889 | "safe-buffer": "^5.1.2", 890 | "tough-cookie": "~2.5.0", 891 | "tunnel-agent": "^0.6.0", 892 | "uuid": "^3.3.2" 893 | }, 894 | "dependencies": { 895 | "tough-cookie": { 896 | "version": "2.5.0", 897 | "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", 898 | "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", 899 | "requires": { 900 | "psl": "^1.1.28", 901 | "punycode": "^2.1.1" 902 | } 903 | } 904 | } 905 | }, 906 | "rimraf": { 907 | "version": "2.7.1", 908 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", 909 | "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", 910 | "requires": { 911 | "glob": "^7.1.3" 912 | } 913 | }, 914 | "safe-buffer": { 915 | "version": "5.1.2", 916 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 917 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 918 | }, 919 | "safer-buffer": { 920 | "version": "2.1.2", 921 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 922 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 923 | }, 924 | "sax": { 925 | "version": "1.2.4", 926 | "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", 927 | "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" 928 | }, 929 | "semver": { 930 | "version": "5.7.1", 931 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 932 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" 933 | }, 934 | "set-blocking": { 935 | "version": "2.0.0", 936 | "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", 937 | "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" 938 | }, 939 | "signal-exit": { 940 | "version": "3.0.3", 941 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", 942 | "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" 943 | }, 944 | "sshpk": { 945 | "version": "1.16.1", 946 | "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", 947 | "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", 948 | "requires": { 949 | "asn1": "~0.2.3", 950 | "assert-plus": "^1.0.0", 951 | "bcrypt-pbkdf": "^1.0.0", 952 | "dashdash": "^1.12.0", 953 | "ecc-jsbn": "~0.1.1", 954 | "getpass": "^0.1.1", 955 | "jsbn": "~0.1.0", 956 | "safer-buffer": "^2.0.2", 957 | "tweetnacl": "~0.14.0" 958 | } 959 | }, 960 | "string-width": { 961 | "version": "1.0.2", 962 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", 963 | "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", 964 | "requires": { 965 | "code-point-at": "^1.0.0", 966 | "is-fullwidth-code-point": "^1.0.0", 967 | "strip-ansi": "^3.0.0" 968 | } 969 | }, 970 | "string.prototype.trimend": { 971 | "version": "1.0.1", 972 | "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", 973 | "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", 974 | "dev": true, 975 | "requires": { 976 | "define-properties": "^1.1.3", 977 | "es-abstract": "^1.17.5" 978 | } 979 | }, 980 | "string.prototype.trimleft": { 981 | "version": "2.1.2", 982 | "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", 983 | "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==", 984 | "dev": true, 985 | "requires": { 986 | "define-properties": "^1.1.3", 987 | "es-abstract": "^1.17.5", 988 | "string.prototype.trimstart": "^1.0.0" 989 | } 990 | }, 991 | "string.prototype.trimright": { 992 | "version": "2.1.2", 993 | "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", 994 | "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==", 995 | "dev": true, 996 | "requires": { 997 | "define-properties": "^1.1.3", 998 | "es-abstract": "^1.17.5", 999 | "string.prototype.trimend": "^1.0.0" 1000 | } 1001 | }, 1002 | "string.prototype.trimstart": { 1003 | "version": "1.0.1", 1004 | "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", 1005 | "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", 1006 | "dev": true, 1007 | "requires": { 1008 | "define-properties": "^1.1.3", 1009 | "es-abstract": "^1.17.5" 1010 | } 1011 | }, 1012 | "string_decoder": { 1013 | "version": "1.1.1", 1014 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", 1015 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", 1016 | "requires": { 1017 | "safe-buffer": "~5.1.0" 1018 | } 1019 | }, 1020 | "strip-ansi": { 1021 | "version": "3.0.1", 1022 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", 1023 | "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", 1024 | "requires": { 1025 | "ansi-regex": "^2.0.0" 1026 | } 1027 | }, 1028 | "strip-json-comments": { 1029 | "version": "2.0.1", 1030 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", 1031 | "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" 1032 | }, 1033 | "tar": { 1034 | "version": "4.4.13", 1035 | "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", 1036 | "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", 1037 | "requires": { 1038 | "chownr": "^1.1.1", 1039 | "fs-minipass": "^1.2.5", 1040 | "minipass": "^2.8.6", 1041 | "minizlib": "^1.2.1", 1042 | "mkdirp": "^0.5.0", 1043 | "safe-buffer": "^5.1.2", 1044 | "yallist": "^3.0.3" 1045 | } 1046 | }, 1047 | "tough-cookie": { 1048 | "version": "4.0.0", 1049 | "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", 1050 | "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", 1051 | "requires": { 1052 | "psl": "^1.1.33", 1053 | "punycode": "^2.1.1", 1054 | "universalify": "^0.1.2" 1055 | } 1056 | }, 1057 | "tslib": { 1058 | "version": "1.13.0", 1059 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", 1060 | "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==" 1061 | }, 1062 | "tunnel-agent": { 1063 | "version": "0.6.0", 1064 | "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", 1065 | "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", 1066 | "requires": { 1067 | "safe-buffer": "^5.0.1" 1068 | } 1069 | }, 1070 | "tweetnacl": { 1071 | "version": "0.14.5", 1072 | "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", 1073 | "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" 1074 | }, 1075 | "universalify": { 1076 | "version": "0.1.2", 1077 | "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", 1078 | "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" 1079 | }, 1080 | "uri-js": { 1081 | "version": "4.2.2", 1082 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", 1083 | "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", 1084 | "requires": { 1085 | "punycode": "^2.1.0" 1086 | } 1087 | }, 1088 | "util": { 1089 | "version": "0.12.3", 1090 | "resolved": "https://registry.npmjs.org/util/-/util-0.12.3.tgz", 1091 | "integrity": "sha512-I8XkoQwE+fPQEhy9v012V+TSdH2kp9ts29i20TaaDUXsg7x/onePbhFJUExBfv/2ay1ZOp/Vsm3nDlmnFGSAog==", 1092 | "dev": true, 1093 | "requires": { 1094 | "inherits": "^2.0.3", 1095 | "is-arguments": "^1.0.4", 1096 | "is-generator-function": "^1.0.7", 1097 | "is-typed-array": "^1.1.3", 1098 | "safe-buffer": "^5.1.2", 1099 | "which-typed-array": "^1.1.2" 1100 | } 1101 | }, 1102 | "util-deprecate": { 1103 | "version": "1.0.2", 1104 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 1105 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" 1106 | }, 1107 | "uuid": { 1108 | "version": "3.4.0", 1109 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", 1110 | "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" 1111 | }, 1112 | "verror": { 1113 | "version": "1.10.0", 1114 | "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", 1115 | "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", 1116 | "requires": { 1117 | "assert-plus": "^1.0.0", 1118 | "core-util-is": "1.0.2", 1119 | "extsprintf": "^1.2.0" 1120 | } 1121 | }, 1122 | "which": { 1123 | "version": "1.3.1", 1124 | "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", 1125 | "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", 1126 | "requires": { 1127 | "isexe": "^2.0.0" 1128 | } 1129 | }, 1130 | "which-typed-array": { 1131 | "version": "1.1.2", 1132 | "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.2.tgz", 1133 | "integrity": "sha512-KT6okrd1tE6JdZAy3o2VhMoYPh3+J6EMZLyrxBQsZflI1QCZIxMrIYLkosd8Twf+YfknVIHmYQPgJt238p8dnQ==", 1134 | "dev": true, 1135 | "requires": { 1136 | "available-typed-arrays": "^1.0.2", 1137 | "es-abstract": "^1.17.5", 1138 | "foreach": "^2.0.5", 1139 | "function-bind": "^1.1.1", 1140 | "has-symbols": "^1.0.1", 1141 | "is-typed-array": "^1.1.3" 1142 | } 1143 | }, 1144 | "wide-align": { 1145 | "version": "1.1.3", 1146 | "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", 1147 | "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", 1148 | "requires": { 1149 | "string-width": "^1.0.2 || 2" 1150 | } 1151 | }, 1152 | "wrappy": { 1153 | "version": "1.0.2", 1154 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1155 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" 1156 | }, 1157 | "yallist": { 1158 | "version": "3.1.1", 1159 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", 1160 | "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" 1161 | } 1162 | } 1163 | } 1164 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "request-curl", 3 | "main": "index.js", 4 | "version": "1.0.0", 5 | "description": "Request.js syntax written with cURL bindings", 6 | "scripts": { 7 | "test": "mocha" 8 | }, 9 | "author": { 10 | "name": "@unreleased" 11 | }, 12 | "keywords": [ 13 | "request.js", 14 | "request-curl", 15 | "curl", 16 | "http2", 17 | "h2" 18 | ], 19 | "license": "ISC", 20 | "dependencies": { 21 | "caseless": "^0.12.0", 22 | "node-libcurl": "^2.1.1" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /readme.MD: -------------------------------------------------------------------------------- 1 | # request-curl 2 | 3 | The goal of this library is to use the request.js syntax/options without using NodeJS's default HTTP Client and instead using cURL to make the requests. Made after spending too long looking for a good HTTP2 supported request client without running into major issues when using proxies or making mass requests such as [`h2-request`](https://www.npmjs.com/package/h2-request) or [`got`](https://www.npmjs.com/package/got). Built to help emulate similar browser-similar HTTP(S) requests to browsers without using a CPU/Memory intensive program such as Selenium or Puppeteer. 4 | 5 | ## Supported Features 6 | 7 | - [x] Headers 8 | - [x] HTTP1.1/HTTP2 9 | - [x] Cipher suites 10 | - [x] Proxy support 11 | - [x] gzip, deflare & br decompression 12 | - [x] Following redirects 13 | - [x] Max redirects 14 | - [x] SSL support 15 | - [x] Automatically convert body to JSON 16 | - [x] Built in JSON parsing 17 | - [x] Automatic Cookiejar/Cookie sessions through ['tough-cookie'](https://www.npmjs.com/package/tough-cookie) 18 | - [x] Supports path as is and disabling rebuilding path dot sequences (AKA Path traversing) `/../` 19 | - [x] Support sending JSON body in request 20 | - [x] Ability to disable tcp socket reuse 21 | - [ ] Ability to use `transform` functions 22 | 23 | # Getting Started 24 | ```javascript 25 | const rc = require("request-curl"); 26 | ``` 27 | `request-curl` works very similar to `request-promise`. The package wraps `node-libcurl` into native promises and uses syntax based on `request`. 28 | 29 | ## Crawl a webpage 30 | ```javascript 31 | (async () => { 32 | const opts = { 33 | uri: "https://www.google.com", 34 | headers: { 35 | "User-Agent": "request-curl", 36 | }, 37 | }; 38 | const resp = await rc(opts); 39 | console.log(resp.body); 40 | }); 41 | ``` 42 | By default, the option `resolveWithFullResponse` is set to true, unlike in `request`. If you want to resolve with only the body, set `resolveWithFullResponse` to `false`. 43 | 44 | ## GET something from a JSON REST API 45 | ```javascript 46 | (async() => { 47 | const opts = { 48 | uri: "http://httpbin.org/get", 49 | json: true, // Automatically parses JSON string in response 50 | headers: { 51 | "User-Agent": "request-curl", 52 | }; 53 | }; 54 | const resp = await rc(opts); 55 | console.log(resp.body); 56 | }); 57 | ``` 58 | 59 | ## POST data to JSON REST API 60 | ```javascript 61 | (async () => { 62 | const opts = { 63 | uri: "http://httpbin.org/post", 64 | json: true, 65 | body: { 66 | "hello": "world", 67 | }, 68 | }; 69 | const resp = await rc(opts); 70 | console.log(resp.body); 71 | }); 72 | ``` 73 | 74 | ## POST like HTML forms 75 | ```javascript 76 | (async() => { 77 | const options = { 78 | uri: "http://httpbin.org/post", 79 | form: { 80 | "hello": "world", 81 | }, 82 | }; 83 | const resp = await rc(opts); 84 | console.log(resp.body); 85 | }); 86 | ``` 87 | 88 | ## Use query strings 89 | ```javascript 90 | (async() => { 91 | const options = { 92 | uri: "http://httpbin.org/get", 93 | qs: { 94 | "hello": "world", 95 | }, 96 | }; 97 | const resp = await rc(opts); 98 | console.log(resp.body); 99 | }); 100 | ``` 101 | 102 | ## Headers 103 | 104 | Currently header order is not supported by cURL. This isn't really a big issue currently since there's many browsers that don't have specified header orders which you can emulate. Headers follow the same request.js syntax. By default no headers are set. 105 | 106 | ```javascript 107 | const opts = { 108 | url: 'https://www.httpbin.org/headers', 109 | headers: { // No default headers 110 | 'User-agent': 'CurlyRequest/v1', 111 | 'Accept': 'application/json' 112 | } 113 | } 114 | ``` 115 | 116 | ## HTTP2 117 | 118 | Curl-request has built in HTTP2 support. This is not enabled by default and must be enabled with the `http2: true` option. 119 | 120 | ## Proxy Support 121 | 122 | Curl-request has one-line proxy support, The same as request.js, it also has authentication support (User/password proxies) 123 | 124 | ```javascript 125 | const opts = { 126 | url: 'https://www.httpbin.org/headers', 127 | proxy: 'http://username:password@45.212.29.55:3128' // Default false 128 | } 129 | ``` 130 | 131 | ## Content Decoding 132 | 133 | Curl-request has support for `br`, `gzip` and `deflate` compression, This means You can use the same `Accept-Encoding` headers as Google Chrome whilst being able to decode the response. Also helps save file-transfer size. 134 | 135 | You can decode these types of responses using `decode: true` or `gzip: true` (The gzip parameter is for fallback support for request.js). Some websites can return invalid content-encoding types which cURL cannot handle throwing a fatal error. You can get the raw response by setting `decode: false` 136 | 137 | ## Redirects 138 | 139 | You can specify whether to follow redirects using the `followRedirects` key. By default Curl-request will follow 3XX redirects. You can also specify a maximum amount of redirects to follow before exiting the request (Prevent getting stuck in a redirect loop) 140 | 141 | ```javascript 142 | const opts = { 143 | url: 'https://www.httpbin.org/headers', 144 | followRedirects: false, // Default true 145 | maxRedirects: 5 // Default 10 146 | } 147 | ``` 148 | 149 | 150 | ## SSL 151 | 152 | Force strict usage of SSL in the requests. 153 | 154 | ```javascript 155 | const opts = { 156 | url: 'https://www.httpbin.org/headers', 157 | strictSSL: false, // Default true 158 | } 159 | ``` 160 | 161 | ## JSON 162 | 163 | Automatically convert the response body to a JSON object rather than having to use `JSON.parse()`. 164 | 165 | ```javascript 166 | const opts = { 167 | url: 'https://www.httpbin.org/headers', 168 | json: true // Default false 169 | } 170 | ``` 171 | -------------------------------------------------------------------------------- /request.js: -------------------------------------------------------------------------------- 1 | const { Curl } = require("node-libcurl") 2 | const Caseless = require('caseless') 3 | const url = require('url') 4 | 5 | 6 | class Request { 7 | constructor(options) { 8 | return this.init(options) 9 | } 10 | 11 | async init(options) { 12 | // Support uri/url params 13 | if (options.url) { 14 | options.uri = options.url 15 | } 16 | 17 | if (options.qs) { 18 | const parsed = url.parse(options.uri) 19 | 20 | // Append to query param 21 | options.uri += (!parsed.search) ? `?` : (parsed.search == '?') ? '' : '&' 22 | 23 | const values = [] 24 | for (let key in options.qs) { 25 | values.push(`${key}=${options.qs[key]}`) 26 | } 27 | 28 | options.uri += values.join('&') 29 | } 30 | 31 | // await new Promise(resolve => setTimeout(resolve, '1000')) 32 | return new Promise(async (resolve, reject) => { 33 | const curl = new Curl() 34 | 35 | curl.setOpt('URL', options.uri) 36 | 37 | // Verbose option for debugging 38 | if (options.verbose) { 39 | curl.setOpt(Curl.option.VERBOSE, true) 40 | curl.setOpt(Curl.option.DEBUGFUNCTION, (infoType, content) => { 41 | if (infoType == 0) { 42 | console.log(Buffer.from(content).toString().trim()) 43 | } 44 | }) 45 | } 46 | 47 | 48 | 49 | if (options.strictSSL) { 50 | curl.setOpt('CAINFO', './cacert-2020-01-01.pem'); 51 | } else { 52 | curl.setOpt('SSL_VERIFYPEER', false) 53 | curl.setOpt('SSL_VERIFYHOST', false) 54 | curl.setOpt('SSL_VERIFYSTATUS', false) 55 | } 56 | 57 | // Request method, defaults to GET 58 | curl.setOpt('CUSTOMREQUEST', options.method || 'GET') 59 | 60 | // Disable NPN/ALPN by default 61 | curl.setOpt("SSL_ENABLE_ALPN", false) 62 | curl.setOpt("SSL_ENABLE_NPN", false) 63 | 64 | // Default SSL off for https requests w/o cert 65 | 66 | 67 | // Handle gzip compression 68 | if (options.gzip) { 69 | curl.setOpt('ACCEPT_ENCODING', '') 70 | } else { 71 | curl.setOpt('HTTP_CONTENT_DECODING', '0') 72 | } 73 | 74 | // Timeout (ms) 75 | if (options.timeout) { 76 | curl.setOpt('TIMEOUT_MS') 77 | } 78 | 79 | // Forever (Handle connection reuse/not reuse) 80 | // Can be used for fingerprinting 81 | if (options.forever) { 82 | curl.setOpt('TCP_KEEPALIVE', 2) 83 | curl.setOpt('FORBID_REUSE', 0) 84 | curl.setOpt('FRESH_CONNECT', 0) 85 | } else { 86 | curl.setOpt('TCP_KEEPALIVE', 0) 87 | curl.setOpt('FORBID_REUSE', 2) 88 | curl.setOpt('FRESH_CONNECT', 1) 89 | } 90 | 91 | // Handle rebuilding URL 92 | // If false path will be rebuild `/../` can't be used as a directory name etc 93 | curl.setOpt('PATH_AS_IS', options.rebuild) 94 | 95 | // Post request form handling 96 | if (options.form) { 97 | const data = [] 98 | const keys = Object.keys(options.form) 99 | 100 | for (let i in keys) { 101 | const key = keys[i] 102 | data.push(`${key}=${options.form[key]}`) 103 | } 104 | 105 | const fields = data.join('&') 106 | curl.setOpt('POSTFIELDS', fields) 107 | 108 | const caseless = Caseless(options.headers) 109 | 110 | // Append content-length header 111 | if (options.headers) { 112 | if (!caseless.get('content-type')) { 113 | caseless.set('content-type', 'application/x-www-form-urlencoded') 114 | } 115 | } else { 116 | options.headers = { 117 | 'content-type': 'application/x-www-form-urlencoded' 118 | } 119 | } 120 | } else if (options.body) { 121 | const caseless = Caseless(options.headers) 122 | if (options.headers) { 123 | if (!caseless.get('content-type')) { 124 | caseless.set('content-type', 'application/json') 125 | } 126 | } else { 127 | options.headers = { 128 | 'content-type': 'application/json' 129 | } 130 | } 131 | 132 | curl.setOpt("POSTFIELDS", JSON.stringify(options.body)) 133 | } 134 | 135 | if (options.qs) { 136 | // Support qs parameter the same as request-promise 137 | const parsed = url.parse(options.uri) 138 | console.log(parsed) 139 | } 140 | 141 | 142 | // HTTP2 143 | if (options.http2) { 144 | curl.setOpt('SSL_ENABLE_ALPN', true) 145 | curl.setOpt('HTTP_VERSION', 'CURL_HTTP_VERSION_2_0') 146 | } else { 147 | curl.setOpt('HTTP_VERSION', 'CURL_HTTP_VERSION_1_1') 148 | } 149 | 150 | const headers = [] 151 | let hasCookieHeader = false 152 | 153 | if (typeof options.headers === 'object') { 154 | for (const header in options.headers) { 155 | if (header.toLowerCase() == 'cookie') { 156 | if (options.jar) { 157 | const cookiesInJar = options.jar.getCookieStringSync(options.uri) 158 | if (!cookiesInJar) { 159 | // Cookie jar is empty, just use cookies inside header 160 | headers.push(`${header}: ${options.headers[header]}`) 161 | } else { 162 | // TODO: maybe make cookies set in the header overwrite that of the jar 163 | headers.push(`${header}: ${options.headers[header]}; ${cookiesInJar}`) 164 | } 165 | } else { 166 | // Has cookie header but no jar, just append 167 | headers.push(`${header}: ${options.headers[header]}`) 168 | } 169 | 170 | hasCookieHeader = true 171 | } else { 172 | headers.push(`${header}: ${options.headers[header]}`) 173 | } 174 | } 175 | } 176 | 177 | if (!hasCookieHeader && options.jar) { 178 | // If there is no cookie header and has a jar, only append jar cookies 179 | const cookiesInJar = options.jar.getCookieStringSync(options.uri) 180 | headers.push(`cookie: ${cookiesInJar}`) 181 | } 182 | 183 | // Set the headers 184 | curl.setOpt('HTTPHEADER', headers) 185 | 186 | // Proxy support 187 | if (options.proxy) { 188 | curl.setOpt('PROXY', options.proxy) 189 | } 190 | 191 | // Disable cURL redirects because we handle them manually for cookiejars 192 | curl.setOpt("FOLLOWLOCATION", false) 193 | 194 | 195 | // Cipher suites 196 | if (options.ciphers) { 197 | curl.setOpt("SSL_CIPHER_LIST", options.ciphers) 198 | } 199 | 200 | 201 | curl.on("end", async function (statusCode, data, headers) { 202 | // Remove results header and compress into single object 203 | // IDK why Curl returns headers as an array, that's a problem for future me! 204 | const respHeaders = headers[headers.length - 1] 205 | delete respHeaders.result 206 | 207 | if (options.jar) { 208 | // Get host to set cookies to 209 | const parsedUrl = url.parse(options.uri) 210 | const host = `${parsedUrl.protocol}//${parsedUrl.host}/` 211 | 212 | // Append set cookie headers to the cookie jar (if using) 213 | const caseless = Caseless(respHeaders) 214 | 215 | if (caseless.get('set-cookie')) { 216 | caseless.get('set-cookie').forEach(function (c) { 217 | const cookie = c.split(';')[0] 218 | options.jar.setCookieSync(cookie, host) 219 | }) 220 | } 221 | } 222 | 223 | 224 | if (options.followRedirects && curl.getInfo("REDIRECT_URL")) { 225 | options.redirectCount = options.redirectCount + 1 || 1 226 | if (options.redirectCount != options.maxRedirects) { 227 | // Use the same socket when following the redirect. 228 | options.forever = true 229 | options.uri = curl.getInfo("REDIRECT_URL") 230 | 231 | options.method = options.followMethod || options.method 232 | if (options.method == "GET") { 233 | // Delete form if following request is GET 234 | delete options.form 235 | delete options.body 236 | } 237 | 238 | this.close() 239 | return resolve(new Request(options)) 240 | } 241 | } 242 | 243 | // Parse json if required 244 | if (options.json) { 245 | try { 246 | data = JSON.parse(data) 247 | } catch (err) { } 248 | } 249 | 250 | // Convert response into same format as request-promise 251 | let response = { 252 | body: data, 253 | headers: respHeaders, 254 | statusCode: statusCode, 255 | } 256 | 257 | // Close then resolve to prevent memory leaks 258 | this.close() 259 | 260 | if (options.runner) { 261 | // Runner, runs a function passed to it before resolving closing 262 | // Allows you to do logging etc 263 | options.runner(response) 264 | } 265 | 266 | resolve(response) 267 | }) 268 | 269 | curl.on("error", function (err) { 270 | curl.close.bind(curl) 271 | this.close() 272 | reject(err) 273 | }) 274 | 275 | // Execute 276 | curl.perform() 277 | }) 278 | } 279 | } 280 | 281 | module.exports = Request -------------------------------------------------------------------------------- /test/request.js: -------------------------------------------------------------------------------- 1 | const assert = require('assert') 2 | const request = require('../index') 3 | 4 | /** 5 | * request-curl unit tests 6 | * run: `npm test` 7 | */ 8 | 9 | 10 | 11 | it('should get a 200 response after following a redirect', function () { 12 | const opts = { 13 | uri: 'http://httpbin.org/absolute-redirect/3', 14 | followRedirects: true 15 | } 16 | 17 | return request(opts).then(res => { 18 | // 200 After it follows the three redirects. 19 | assert.equal(res.statusCode, 200) 20 | }) 21 | }).timeout(7500) 22 | 23 | it('should get a 302 response and not follow the redirect', function () { 24 | const opts = { 25 | uri: 'http://httpbin.org/absolute-redirect/1', 26 | followRedirects: false 27 | } 28 | 29 | return request(opts).then(res => { 30 | // 302 if it hasn't followed the redirect :) 31 | assert.equal(res.statusCode, 302) 32 | }) 33 | }).timeout(5000) 34 | 35 | it('should set cookies to the jar which should be present on the request afterwards', function () { 36 | const jar = request.jar() 37 | 38 | const opts = { 39 | uri: 'http://httpbin.org/cookies/set/foo/bar', 40 | jar: jar 41 | } 42 | 43 | return request(opts).then(res => { 44 | const cookies = jar.getCookieStringSync('http://httpbin.org/') 45 | assert.equal(cookies, 'foo=bar') 46 | }) 47 | }).timeout(5000) 48 | 49 | it('should return 200 when the request finished', function () { 50 | return request('http://httpbin.org/status/200').then(res => { 51 | assert.equal(res.statusCode, 200) 52 | }) 53 | }).timeout(5000) 54 | 55 | it('should return a parsed object when the request is finished', function () { 56 | const opts = { 57 | uri: 'http://httpbin.org/headers', 58 | json: true 59 | } 60 | 61 | return request(opts).then(res => { 62 | assert.equal(typeof res.body, 'object') 63 | }) 64 | }).timeout(5000) 65 | 66 | it('should show request-curl-test/1.1 as the user-agent', function () { 67 | const opts = { 68 | uri: 'http://httpbin.org/headers', 69 | headers: { 70 | 'user-agent': 'request-curl-test/1.1' 71 | }, 72 | json: true 73 | } 74 | 75 | return request(opts).then(res => { 76 | assert.equal(res.body.headers['User-Agent'], 'request-curl-test/1.1') 77 | }) 78 | }).timeout(5000) 79 | 80 | it('should fail to decode gzip formatted data', function () { 81 | const opts = { 82 | uri: 'https://httpbin.org/gzip', 83 | headers: { 84 | 'accept-encoding': 'gzip' 85 | }, 86 | gzip: false 87 | } 88 | 89 | return request(opts).then(res => { 90 | if (res.headers['Content-Encoding'] === 'gzip') { 91 | // Find a keyword that would exist in body 92 | assert.equal(res.body.includes('headers'), false) 93 | } 94 | }) 95 | }).timeout(5000) 96 | 97 | it('should decode gzip formatted data', function () { 98 | const opts = { 99 | uri: 'https://httpbin.org/gzip', 100 | headers: { 101 | 'accept-encoding': 'gzip' 102 | }, 103 | gzip: true 104 | } 105 | 106 | return request(opts).then(res => { 107 | if (res.headers['Content-Encoding'] === 'gzip') { 108 | // Find a keyword that would exist in body 109 | assert.equal(res.body.includes('headers'), true) 110 | } 111 | }) 112 | }).timeout(5000) 113 | 114 | it('should contain headers set by two different default functions', function () { 115 | const defaults = request.defaults({ 116 | headers: { 117 | 'foo': 'bar' 118 | } 119 | }).defaults({ 120 | headers: { 121 | 'moo': 'car' 122 | }, 123 | json: true 124 | }) 125 | 126 | defaults('http://httpbin.org/headers').then(res => { 127 | const hasHeaders = (res.body.headers['Foo'] && res.body.headers['Moo']) ? true : false 128 | assert.equal(hasHeaders, true) 129 | }) 130 | 131 | }).timeout(5000) 132 | 133 | it('should contain different header values set by two different default functions', async function () { 134 | const defaults1 = request.defaults({ 135 | headers: { 136 | 'foo': 'bar' 137 | }, 138 | json: true 139 | }) 140 | 141 | const defaults2 = defaults1.defaults({ 142 | headers: { 143 | 'foo': 'car' 144 | }, 145 | json: true 146 | }) 147 | 148 | // Run backwards 149 | const response2 = await defaults2('http://httpbin.org/headers').then(res => res.body.headers['Foo']) 150 | const response1 = await defaults1('http://httpbin.org/headers').then(res => res.body.headers['Foo']) 151 | 152 | assert.notEqual(response2, response1) 153 | }).timeout(5000) 154 | 155 | it('should return the form data', function () { 156 | const payload = { 157 | 'foo': 'bar', 158 | 'moo': 'carrr' 159 | } 160 | 161 | // Will automatically append application/x-www-form-urlencoded header if one isn't set through headers 162 | // It will not modify the request if a different content-type is set 163 | const opts = { 164 | uri: 'http://httpbin.org/anything', 165 | form: payload, 166 | json: true 167 | } 168 | 169 | return request(opts).then(res => { 170 | const len = Object.keys(res.body.form).length 171 | assert.equal(len, 2) 172 | }) 173 | }) 174 | 175 | it('should return the json data', function () { 176 | const payload = { 177 | 'foo': 'bar', 178 | 'moo': 'carrr' 179 | } 180 | 181 | // Will automatically append application/json header if one isn't set through headers 182 | // It will not modify the request if a different content-type is set 183 | const opts = { 184 | uri: 'http://httpbin.org/anything', 185 | body: payload, 186 | json: true 187 | } 188 | 189 | return request(opts).then(res => { 190 | const len = Object.keys(res.body.json).length 191 | assert.equal(len, 2) 192 | }) 193 | }) 194 | 195 | it('should return different cookies from different cookie jars', async function () { 196 | // Create jar and set cookies to it 197 | const jar1 = request.jar() 198 | jar1.setCookieSync('foo=bar', 'http://httpbin.org/') 199 | jar1.setCookieSync('moo=car', 'http://httpbin.org/') 200 | 201 | const jar2 = request.jar() 202 | jar2.setCookieSync('you=are', 'http://httpbin.org/') 203 | jar2.setCookieSync('sup=er', 'http://httpbin.org/') 204 | 205 | const opts = { 206 | uri: 'http://httpbin.org/cookies', 207 | json: true, 208 | } 209 | 210 | const cookies1 = await request({ ...opts, jar: jar1 }).then(res => res.body.cookies) 211 | const cookies2 = await request({ ...opts, jar: jar2 }).then(res => res.body.cookies) 212 | 213 | function deepEqual(x, y) { 214 | const ok = Object.keys, tx = typeof x, ty = typeof y; 215 | return x && y && tx === 'object' && tx === ty ? ( 216 | ok(x).length === ok(y).length && 217 | ok(x).every(key => deepEqual(x[key], y[key])) 218 | ) : (x === y); 219 | } 220 | 221 | // Should be false 222 | assert.equal(deepEqual(cookies1, cookies2), false) 223 | }).timeout(7500) 224 | 225 | it('should return the cookies from the cookie jar and header and make the request return the combined cookies', function () { 226 | // Create jar and set cookies to it 227 | const jar = request.jar() 228 | jar.setCookieSync('foo=bar', 'http://httpbin.org/') 229 | jar.setCookieSync('moo=car', 'http://httpbin.org/') 230 | 231 | const opts = { 232 | uri: 'http://httpbin.org/cookies', 233 | headers: { 234 | 'cookie': 'too=far' 235 | }, 236 | jar: jar, 237 | json: true 238 | } 239 | 240 | return request(opts).then(res => { 241 | // Should have three cookies 242 | const len = Object.keys(res.body.cookies).length 243 | assert.equal(len, 3) 244 | }) 245 | }).timeout(5000) 246 | 247 | it('should return the cookies from the cookie jar', function () { 248 | // Create jar and set cookies to it 249 | const jar = request.jar() 250 | jar.setCookieSync('foo=bar', 'http://httpbin.org/') 251 | jar.setCookieSync('moo=car', 'http://httpbin.org/') 252 | 253 | const opts = { 254 | uri: 'http://httpbin.org/cookies', 255 | jar: jar, 256 | json: true 257 | } 258 | 259 | return request(opts).then(res => { 260 | // Should have three cookies 261 | const len = Object.keys(res.body.cookies).length 262 | assert.equal(len, 2) 263 | }) 264 | }).timeout(5000) --------------------------------------------------------------------------------