From 38faa5b85741aabfca61aa37d1ef044d68969ddf Mon Sep 17 00:00:00 2001 From: Adam Pash Date: Thu, 17 Nov 2016 10:18:23 -0800 Subject: [PATCH] feat: added parsed headers to response object --- index.js | 220 ++++++++-------- package.json | 7 +- yarn.lock | 727 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 843 insertions(+), 111 deletions(-) create mode 100644 yarn.lock diff --git a/index.js b/index.js index 1a77c6f..9dd1dcd 100644 --- a/index.js +++ b/index.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +var httpHeaders = require('http-headers') var XHR = XMLHttpRequest if (!XHR) throw new Error('missing XMLHttpRequest') request.log = { @@ -32,41 +33,41 @@ function request(options, callback) { if(!options) throw new Error('No options given') - var options_onResponse = options.onResponse; // Save this for later. + var options_onResponse = options.onResponse // Save this for later. if(typeof options === 'string') - options = {'uri':options}; + options = {'uri':options} else - options = JSON.parse(JSON.stringify(options)); // Use a duplicate for mutating. + options = JSON.parse(JSON.stringify(options)) // Use a duplicate for mutating. options.onResponse = options_onResponse // And put it back. - if (options.verbose) request.log = getLogger(); + if (options.verbose) request.log = getLogger() if(options.url) { - options.uri = options.url; - delete options.url; + options.uri = options.url + delete options.url } if(!options.uri && options.uri !== "") - throw new Error("options.uri is a required argument"); + throw new Error("options.uri is a required argument") if(typeof options.uri != "string") - throw new Error("options.uri must be a string"); + throw new Error("options.uri must be a string") var unsupported_options = ['proxy', '_redirectsFollowed', 'maxRedirects', 'followRedirect'] for (var i = 0; i < unsupported_options.length; i++) if(options[ unsupported_options[i] ]) - throw new Error("options." + unsupported_options[i] + " is not supported") + throw new Error("options." + unsupported_options[i] + " is not supported") options.callback = callback - options.method = options.method || 'GET'; - options.headers = options.headers || {}; + options.method = options.method || 'GET' + options.headers = options.headers || {} options.body = options.body || null options.timeout = options.timeout || request.DEFAULT_TIMEOUT if(options.headers.host) - throw new Error("Options.headers.host is not supported"); + throw new Error("Options.headers.host is not supported") if(options.json) { options.headers.accept = options.headers.accept || 'application/json' @@ -78,67 +79,67 @@ function request(options, callback) { else if(typeof options.body !== 'string') options.body = JSON.stringify(options.body) } - + //BEGIN QS Hack var serialize = function(obj) { - var str = []; + var str = [] for(var p in obj) if (obj.hasOwnProperty(p)) { - str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p])); + str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p])) } - return str.join("&"); + return str.join("&") } - + if(options.qs){ - var qs = (typeof options.qs == 'string')? options.qs : serialize(options.qs); + var qs = (typeof options.qs == 'string')? options.qs : serialize(options.qs) if(options.uri.indexOf('?') !== -1){ //no get params - options.uri = options.uri+'&'+qs; + options.uri = options.uri+'&'+qs }else{ //existing get params - options.uri = options.uri+'?'+qs; + options.uri = options.uri+'?'+qs } } //END QS Hack - + //BEGIN FORM Hack var multipart = function(obj) { //todo: support file type (useful?) - var result = {}; - result.boundry = '-------------------------------'+Math.floor(Math.random()*1000000000); - var lines = []; + var result = {} + result.boundry = '-------------------------------'+Math.floor(Math.random()*1000000000) + var lines = [] for(var p in obj){ - if (obj.hasOwnProperty(p)) { - lines.push( - '--'+result.boundry+"\n"+ - 'Content-Disposition: form-data; name="'+p+'"'+"\n"+ - "\n"+ - obj[p]+"\n" - ); - } + if (obj.hasOwnProperty(p)) { + lines.push( + '--'+result.boundry+"\n"+ + 'Content-Disposition: form-data; name="'+p+'"'+"\n"+ + "\n"+ + obj[p]+"\n" + ) + } } - lines.push( '--'+result.boundry+'--' ); - result.body = lines.join(''); - result.length = result.body.length; - result.type = 'multipart/form-data; boundary='+result.boundry; - return result; + lines.push( '--'+result.boundry+'--' ) + result.body = lines.join('') + result.length = result.body.length + result.type = 'multipart/form-data; boundary='+result.boundry + return result } - + if(options.form){ - if(typeof options.form == 'string') throw('form name unsupported'); + if(typeof options.form == 'string') throw('form name unsupported') if(options.method === 'POST'){ - var encoding = (options.encoding || 'application/x-www-form-urlencoded').toLowerCase(); - options.headers['content-type'] = encoding; - switch(encoding){ - case 'application/x-www-form-urlencoded': - options.body = serialize(options.form).replace(/%20/g, "+"); - break; - case 'multipart/form-data': - var multi = multipart(options.form); - //options.headers['content-length'] = multi.length; - options.body = multi.body; - options.headers['content-type'] = multi.type; - break; - default : throw new Error('unsupported encoding:'+encoding); - } + var encoding = (options.encoding || 'application/x-www-form-urlencoded').toLowerCase() + options.headers['content-type'] = encoding + switch(encoding){ + case 'application/x-www-form-urlencoded': + options.body = serialize(options.form).replace(/%20/g, "+") + break + case 'multipart/form-data': + var multi = multipart(options.form) + //options.headers['content-length'] = multi.length; + options.body = multi.body + options.headers['content-type'] = multi.type + break + default : throw new Error('unsupported encoding:'+encoding) + } } } //END FORM Hack @@ -157,7 +158,7 @@ function request(options, callback) { // HTTP basic authentication if(!options.headers.authorization && options.auth) - options.headers.authorization = 'Basic ' + b64_enc(options.auth.username + ':' + options.auth.password); + options.headers.authorization = 'Basic ' + b64_enc(options.auth.username + ':' + options.auth.password) return run_xhr(options) } @@ -269,6 +270,7 @@ function run_xhr(options) { request.log.debug('Request done', {'id':xhr.id}) xhr.body = xhr.responseText + xhr.headers = httpHeaders(xhr.getAllResponseHeaders()) if(options.json) { try { xhr.body = JSON.parse(xhr.responseText) } catch (er) { return options.callback(er, xhr) } @@ -279,8 +281,8 @@ function run_xhr(options) { } // request -request.withCredentials = false; -request.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT; +request.withCredentials = false +request.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT // // defaults @@ -290,9 +292,9 @@ request.defaults = function(options, requester) { var def = function (method) { var d = function (params, callback) { if(typeof params === 'string') - params = {'uri': params}; + params = {'uri': params} else { - params = JSON.parse(JSON.stringify(params)); + params = JSON.parse(JSON.stringify(params)) } for (var i in options) { if (params[i] === undefined) params[i] = options[i] @@ -313,21 +315,21 @@ request.defaults = function(options, requester) { // HTTP method shortcuts // -var shortcuts = [ 'get', 'put', 'post', 'head' ]; +var shortcuts = [ 'get', 'put', 'post', 'head' ] shortcuts.forEach(function(shortcut) { - var method = shortcut.toUpperCase(); - var func = shortcut.toLowerCase(); + var method = shortcut.toUpperCase() + var func = shortcut.toLowerCase() request[func] = function(opts) { if(typeof opts === 'string') - opts = {'method':method, 'uri':opts}; + opts = {'method':method, 'uri':opts} else { - opts = JSON.parse(JSON.stringify(opts)); - opts.method = method; + opts = JSON.parse(JSON.stringify(opts)) + opts.method = method } - var args = [opts].concat(Array.prototype.slice.apply(arguments, [1])); - return request.apply(this, args); + var args = [opts].concat(Array.prototype.slice.apply(arguments, [1])) + return request.apply(this, args) } }) @@ -359,10 +361,10 @@ request.couch = function(options, callback) { er = new Error('CouchDB error: ' + (body.error.reason || body.error.error)) for (var key in body) er[key] = body[key] - return callback(er, resp, body); + return callback(er, resp, body) } - return callback(er, resp, body); + return callback(er, resp, body) } } @@ -403,15 +405,15 @@ function formatted(obj, method) { function is_crossDomain(url) { var rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/ - // jQuery #8138, IE may throw an exception when accessing - // a field from window.location if document.domain has been set - var ajaxLocation + // jQuery #8138, IE may throw an exception when accessing + // a field from window.location if document.domain has been set + var ajaxLocation try { ajaxLocation = location.href } catch (e) { // Use the href attribute of an A element since IE will modify it given document.location - ajaxLocation = document.createElement( "a" ); - ajaxLocation.href = ""; - ajaxLocation = ajaxLocation.href; + ajaxLocation = document.createElement( "a" ) + ajaxLocation.href = "" + ajaxLocation = ajaxLocation.href } var ajaxLocParts = rurl.exec(ajaxLocation.toLowerCase()) || [] @@ -419,10 +421,10 @@ function is_crossDomain(url) { var result = !!( parts && - ( parts[1] != ajaxLocParts[1] - || parts[2] != ajaxLocParts[2] - || (parts[3] || (parts[1] === "http:" ? 80 : 443)) != (ajaxLocParts[3] || (ajaxLocParts[1] === "http:" ? 80 : 443)) - ) + ( parts[1] != ajaxLocParts[1] + || parts[2] != ajaxLocParts[2] + || (parts[3] || (parts[1] === "http:" ? 80 : 443)) != (ajaxLocParts[3] || (ajaxLocParts[1] === "http:" ? 80 : 443)) + ) ) //console.debug('is_crossDomain('+url+') -> ' + result) @@ -431,44 +433,44 @@ function is_crossDomain(url) { // MIT License from http://phpjs.org/functions/base64_encode:358 function b64_enc (data) { - // Encodes string using MIME base64 algorithm - var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, ac = 0, enc="", tmp_arr = []; + // Encodes string using MIME base64 algorithm + var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" + var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, ac = 0, enc="", tmp_arr = [] - if (!data) { - return data; - } + if (!data) { + return data + } - // assume utf8 data - // data = this.utf8_encode(data+''); + // assume utf8 data + // data = this.utf8_encode(data+''); - do { // pack three octets into four hexets - o1 = data.charCodeAt(i++); - o2 = data.charCodeAt(i++); - o3 = data.charCodeAt(i++); + do { // pack three octets into four hexets + o1 = data.charCodeAt(i++) + o2 = data.charCodeAt(i++) + o3 = data.charCodeAt(i++) - bits = o1<<16 | o2<<8 | o3; + bits = o1<<16 | o2<<8 | o3 - h1 = bits>>18 & 0x3f; - h2 = bits>>12 & 0x3f; - h3 = bits>>6 & 0x3f; - h4 = bits & 0x3f; + h1 = bits>>18 & 0x3f + h2 = bits>>12 & 0x3f + h3 = bits>>6 & 0x3f + h4 = bits & 0x3f - // use hexets to index into b64, and append result to encoded string - tmp_arr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4); - } while (i < data.length); + // use hexets to index into b64, and append result to encoded string + tmp_arr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4) + } while (i < data.length) - enc = tmp_arr.join(''); + enc = tmp_arr.join('') - switch (data.length % 3) { - case 1: - enc = enc.slice(0, -2) + '=='; - break; - case 2: - enc = enc.slice(0, -1) + '='; - break; - } + switch (data.length % 3) { + case 1: + enc = enc.slice(0, -2) + '==' + break + case 2: + enc = enc.slice(0, -1) + '=' + break + } - return enc; + return enc } -module.exports = request; +module.exports = request diff --git a/package.json b/package.json index 1c356d8..488a8a4 100644 --- a/package.json +++ b/package.json @@ -21,9 +21,9 @@ "test": "beefy test.js" }, "devDependencies": { - "tape": "~1.0.4", "beefy": "~0.4.0", - "browserify": "~2.25.0" + "browserify": "~2.25.0", + "tape": "~1.0.4" }, "engines": [ "node" @@ -41,5 +41,8 @@ "iphone/6", "ipad/6" ] + }, + "dependencies": { + "http-headers": "^3.0.1" } } diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..e105999 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,727 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 +abbrev@1: + version "1.0.9" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + +ambi@^2.2.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/ambi/-/ambi-2.5.0.tgz#7c8e372be48891157e7cea01cb6f9143d1f74220" + dependencies: + editions "^1.1.1" + typechecker "^4.3.0" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + +astw@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/astw/-/astw-0.0.0.tgz#4490866a3ef116aaf91adba63ca7ddf70b6d59bd" + dependencies: + esprima "1.0.2" + +base64-js@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-0.0.2.tgz#024f0f72afa25b75f9c0ee73cd4f55ec1bed9784" + +Base64@~0.1.2: + version "0.1.4" + resolved "https://registry.yarnpkg.com/Base64/-/Base64-0.1.4.tgz#e9f6c6bef567fd635ea4162ab14dd329e74aa6de" + +beefy@~0.4.0: + version "0.4.5" + resolved "https://registry.yarnpkg.com/beefy/-/beefy-0.4.5.tgz#9f5b8e14220a3fc631f752bdb269ff2071d64102" + dependencies: + colors "~0.6.0-1" + mime "~1.2.9" + nopt "~2.1.1" + open "0.0.3" + portfinder "~0.2.1" + response-stream "0.0.0" + script-injector "~0.1.0" + sse-stream "0.0.4" + through "~2.2.0" + watchr "~2.4.3" + +bops@0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/bops/-/bops-0.0.6.tgz#082d1d55fa01e60dbdc2ebc2dba37f659554cf3a" + dependencies: + base64-js "0.0.2" + to-utf8 "0.0.1" + +browser-builtins@~1.0.1: + version "1.0.7" + resolved "https://registry.yarnpkg.com/browser-builtins/-/browser-builtins-1.0.7.tgz#c54dff4ff0fd7aca411fc6bc2d6e01f5447e63d3" + dependencies: + buffer-browserify "0.1.x" + console-browserify "0.1.x" + constants-browserify "0.0.x" + crypto-browserify "1.0.x" + http-browserify "0.1.x" + punycode "1.2.x" + resolve "0.3.x" + vm-browserify "0.0.x" + zlib-browserify "0.0.x" + +browser-pack@~0.9.4: + version "0.9.4" + resolved "https://registry.yarnpkg.com/browser-pack/-/browser-pack-0.9.4.tgz#c8cc9ca31f3de0677fd545493af8bdee14b60f1b" + dependencies: + combine-source-map "~0.1.1" + JSONStream "~0.6.4" + through "~2.3.4" + +browser-resolve@~1.1.0: + version "1.1.4" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.1.4.tgz#fc3b39ffb060c289d86668870b51326df0e76adc" + dependencies: + resolve "0.5.1" + +browserify@~2.25.0: + version "2.25.1" + resolved "https://registry.yarnpkg.com/browserify/-/browserify-2.25.1.tgz#eec11a53d338caf81c414d8581793fcc24d54fbb" + dependencies: + browser-builtins "~1.0.1" + browser-pack "~0.9.4" + browser-resolve "~1.1.0" + concat-stream "~1.0.0" + deps-sort "~0.1.1" + duplexer "~0.1.1" + event-stream "~3.0.15" + inherits "~1.0.0" + insert-module-globals "~1.2.0" + JSONStream "~0.6.4" + module-deps "~1.0.1" + optimist "~0.5.1" + parents "~0.0.1" + shell-quote "~0.0.1" + syntax-error "~0.0.0" + through "~2.3.4" + umd "~1.1.0" + +buffer-browserify@0.1.x: + version "0.1.0" + resolved "https://registry.yarnpkg.com/buffer-browserify/-/buffer-browserify-0.1.0.tgz#ae2af03df688695fa36be05f592c81a063298ddf" + dependencies: + base64-js "0.0.2" + +callsite@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20" + +colors@~0.6.0-1: + version "0.6.2" + resolved "https://registry.yarnpkg.com/colors/-/colors-0.6.2.tgz#2423fe6678ac0c5dae8852e5d0e5be08c997abcc" + +combine-source-map@~0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/combine-source-map/-/combine-source-map-0.1.3.tgz#ddb7593a0f1672b88212702250147bc4e9ea95cf" + dependencies: + convert-source-map "~0.2.3" + inline-source-map "~0.2.1" + parse-base64vlq-mappings "~0.1.1" + +commondir@~0.0.1: + version "0.0.2" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-0.0.2.tgz#c49c8880c6fe96844bb3525dd2e7314050c389ee" + +concat-stream@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.0.1.tgz#018b18bc1c7d073a2dc82aa48442341a2c4dd79f" + dependencies: + bops "0.0.6" + +console-browserify@0.1.x: + version "0.1.6" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-0.1.6.tgz#d128a3c0bb88350eb5626c6e7c71a6f0fd48983c" + +constants-browserify@0.0.x: + version "0.0.1" + resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-0.0.1.tgz#92577db527ba6c4cf0a4568d84bc031f441e21f2" + +convert-source-map@~0.2.3: + version "0.2.6" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-0.2.6.tgz#ae0ed736e8a6344a58b50a894723de5c851de2d4" + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +crypto-browserify@1.0.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-1.0.9.tgz#cc5449685dfb85eb11c9828acc7cb87ab5bbfcc0" + +csextends@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/csextends/-/csextends-1.0.3.tgz#df41407bfddb1837ecc2dd28587725d6af9550f8" + +cssauron@^1.1.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/cssauron/-/cssauron-1.4.0.tgz#a6602dff7e04a8306dc0db9a551e92e8b5662ad8" + dependencies: + through X.X.X + +deep-equal@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-0.0.0.tgz#99679d3bbd047156fcd450d3d01eeb9068691e83" + +defined@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/defined/-/defined-0.0.0.tgz#f35eea7d705e933baf13b2f03b3f83d921403b3e" + +deps-sort@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/deps-sort/-/deps-sort-0.1.2.tgz#daa2fb614a17c9637d801e2f55339ae370f3611a" + dependencies: + JSONStream "~0.6.4" + minimist "~0.0.1" + through "~2.3.4" + +detective@~2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/detective/-/detective-2.1.2.tgz#d22ad9f18c82efb3f55fee2e244883da6bbb8e37" + dependencies: + escodegen "0.0.15" + esprima "1.0.2" + +duplexer@~0.0.3: + version "0.0.4" + resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.0.4.tgz#afcb7f1f8b8d74f820726171d5d64ac9e4a8ff20" + +duplexer@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" + +duplexer2@~0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db" + dependencies: + readable-stream "~1.1.9" + +eachr@^2.0.2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/eachr/-/eachr-2.0.4.tgz#466f7caa10708f610509e32c807aafe57fc122bf" + dependencies: + typechecker "^2.0.8" + +editions@^1.1.1, editions@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/editions/-/editions-1.3.3.tgz#0907101bdda20fac3cbe334c27cbd0688dc99a5b" + +escodegen@0.0.15: + version "0.0.15" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-0.0.15.tgz#ffda9cb26b70b34f7cc19f1d88756539afb543bd" + dependencies: + esprima ">= 1.0.0" + optionalDependencies: + source-map ">= 0.1.2" + +"esprima@>= 1.0.0": + version "3.1.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.1.tgz#02dbcc5ac3ece81070377f99158ec742ab5dda06" + +esprima@~0.9.9: + version "0.9.9" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-0.9.9.tgz#1b90925c975d632d7282939c3bb9c3a423c30490" + +esprima@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-1.0.2.tgz#8039bf9ceac4d9d2c15f623264fb292b5502ceaf" + +event-stream@~3.0.15: + version "3.0.20" + resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.0.20.tgz#038bbb2ea9ea90385b26fbc1854d0b539f2abea3" + dependencies: + duplexer "~0.1.1" + from "~0" + map-stream "~0.0.3" + pause-stream "0.0.11" + split "0.2" + stream-combiner "~0.0.3" + through "~2.3.1" + +extendr@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/extendr/-/extendr-2.1.0.tgz#301aa0bbea565f4d2dc8f570f2a22611a8527b56" + dependencies: + typechecker "~2.0.1" + +extract-opts@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/extract-opts/-/extract-opts-2.2.0.tgz#1fa28eba7352c6db480f885ceb71a46810be6d7d" + dependencies: + typechecker "~2.0.1" + +from@~0: + version "0.1.3" + resolved "https://registry.yarnpkg.com/from/-/from-0.1.3.tgz#ef63ac2062ac32acf7862e0d40b44b896f22f3bc" + +graceful-fs@*: + version "4.1.10" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.10.tgz#f2d720c22092f743228775c75e3612632501f131" + +html-select@^2.3.5: + version "2.3.24" + resolved "https://registry.yarnpkg.com/html-select/-/html-select-2.3.24.tgz#46ad6d712e732cf31c6739d5d0110a5fabf17585" + dependencies: + cssauron "^1.1.0" + duplexer2 "~0.0.2" + inherits "^2.0.1" + minimist "~0.0.8" + readable-stream "^1.0.27-1" + split "~0.3.0" + stream-splicer "^1.2.0" + through2 "^1.0.0" + +html-tokenize@^1.1.1: + version "1.2.5" + resolved "https://registry.yarnpkg.com/html-tokenize/-/html-tokenize-1.2.5.tgz#7e5ba99ecb51ef906ec9a7fcdee6ca3267c7897e" + dependencies: + inherits "~2.0.1" + minimist "~0.0.8" + readable-stream "~1.0.27-1" + through2 "~0.4.1" + +http-browserify@0.1.x: + version "0.1.14" + resolved "https://registry.yarnpkg.com/http-browserify/-/http-browserify-0.1.14.tgz#9c8b3f94002204547c7cbe5269afe2ea62f71c7f" + dependencies: + Base64 "~0.1.2" + concat-stream "~1.0.0" + +http-headers: + version "3.0.1" + resolved "https://registry.yarnpkg.com/http-headers/-/http-headers-3.0.1.tgz#1cbc691c45cdf6d6c1dc63bf368b2505f56ef839" + dependencies: + next-line "^1.0.0" + +ignorefs@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/ignorefs/-/ignorefs-1.2.0.tgz#da59fb858976e4a5e43702ccd1f282fdbc9e5756" + dependencies: + editions "^1.3.3" + ignorepatterns "^1.1.0" + +ignorepatterns@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/ignorepatterns/-/ignorepatterns-1.1.0.tgz#ac8f436f2239b5dfb66d5f0d3a904a87ac67cc5e" + +indexof@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" + +inherits@^2.0.0, inherits@^2.0.1, inherits@~2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +inherits@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-1.0.2.tgz#ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b" + +inline-source-map@~0.2.1: + version "0.2.5" + resolved "https://registry.yarnpkg.com/inline-source-map/-/inline-source-map-0.2.5.tgz#242ff6c18b9fb0934f7a9e83c14219c61c131670" + dependencies: + source-map "~0.1.25" + +insert-module-globals@~1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/insert-module-globals/-/insert-module-globals-1.2.1.tgz#09b48c66ed326a6c1bbce03598433c60c7c24d13" + dependencies: + commondir "~0.0.1" + duplexer "~0.0.3" + JSONStream "~0.4.3" + lexical-scope "~0.0.5" + process "~0.5.1" + through "~2.2.0" + +isarray@~0.0.1, isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsonparse@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-0.0.5.tgz#330542ad3f0a654665b778f3eb2d9a9fa507ac64" + +JSONStream@~0.4.3: + version "0.4.4" + resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-0.4.4.tgz#cc2cf119286c45be150423cbc128d480e9b54ae2" + dependencies: + jsonparse "0.0.5" + +JSONStream@~0.6.4: + version "0.6.4" + resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-0.6.4.tgz#4b2c8063f8f512787b2375f7ee9db69208fa2dcb" + dependencies: + jsonparse "0.0.5" + through "~2.2.7" + +lexical-scope@~0.0.5: + version "0.0.15" + resolved "https://registry.yarnpkg.com/lexical-scope/-/lexical-scope-0.0.15.tgz#ca595997aaed87b155cb041f48dc0438f48a04dc" + dependencies: + astw "~0.0.0" + +map-stream@~0.0.3: + version "0.0.6" + resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.0.6.tgz#d2ef4eb811a28644c7a8989985c69c2fdd496827" + +mime@~1.2.9: + version "1.2.11" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.2.11.tgz#58203eed86e3a5ef17aed2b7d9ebd47f0a60dd10" + +minimist@~0.0.1, minimist@~0.0.8: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + +mkdirp@0.0.x: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.0.7.tgz#d89b4f0e4c3e5e5ca54235931675e094fe1a5072" + +module-deps@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/module-deps/-/module-deps-1.0.2.tgz#5ee83cfd70ba883869fa6cbaeb82334a8f069fcb" + dependencies: + browser-resolve "~1.1.0" + concat-stream "~1.0.0" + detective "~2.1.2" + JSONStream "~0.6.4" + minimist "~0.0.1" + resolve "~0.4.0" + through "~2.3.4" + +next-line@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/next-line/-/next-line-1.1.0.tgz#fcae57853052b6a9bae8208e40dd7d3c2d304603" + +nopt@~2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-2.1.2.tgz#6cccd977b80132a07731d6e8ce58c2c8303cf9af" + dependencies: + abbrev "1" + +object-keys@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-0.4.0.tgz#28a6aae7428dd2c3a92f3d95f21335dd204e0336" + +open@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/open/-/open-0.0.3.tgz#fa377f4ff308212d92a9b8e6395240854646a713" + +optimist@~0.3.5: + version "0.3.7" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.3.7.tgz#c90941ad59e4273328923074d2cf2e7cbc6ec0d9" + dependencies: + wordwrap "~0.0.2" + +optimist@~0.5.1: + version "0.5.2" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.5.2.tgz#85c8c1454b3315e4a78947e857b1df033450bfbc" + dependencies: + wordwrap "~0.0.2" + +parents@~0.0.1: + version "0.0.3" + resolved "https://registry.yarnpkg.com/parents/-/parents-0.0.3.tgz#fa212f024d9fa6318dbb6b4ce676c8be493b9c43" + dependencies: + path-platform "^0.0.1" + +parse-base64vlq-mappings@~0.1.1: + version "0.1.4" + resolved "https://registry.yarnpkg.com/parse-base64vlq-mappings/-/parse-base64vlq-mappings-0.1.4.tgz#fcf5ddded39a010df8e3dc609c86ed01017dfa98" + +path-platform@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/path-platform/-/path-platform-0.0.1.tgz#b5585d7c3c463d89aa0060d86611cf1afd617e2a" + +pause-stream@0.0.11: + version "0.0.11" + resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445" + dependencies: + through "~2.3" + +portfinder@~0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-0.2.1.tgz#b2b9b0164f9e17fa3a9c7db2304d0a75140c71ad" + dependencies: + mkdirp "0.0.x" + +process@~0.5.1: + version "0.5.2" + resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" + +punycode@1.2.x: + version "1.2.4" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.2.4.tgz#54008ac972aec74175def9cba6df7fa9d3918740" + +readable-stream@^1.0.27-1, readable-stream@^1.1.13-1, "readable-stream@>=1.1.13-1 <1.2.0-0", readable-stream@~1.1.9: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@~1.0.17, readable-stream@~1.0.27-1: + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-wrap@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/readable-wrap/-/readable-wrap-1.0.0.tgz#3b5a211c631e12303a54991c806c17e7ae206bff" + dependencies: + readable-stream "^1.1.13-1" + +resolve@~0.3.0, resolve@0.3.x: + version "0.3.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-0.3.1.tgz#34c63447c664c70598d1c9b126fc43b2a24310a4" + +resolve@~0.4.0: + version "0.4.3" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-0.4.3.tgz#dcadad202e7cacc2467e3a38800211f42f9c13df" + +resolve@0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-0.5.1.tgz#15e4a222c4236bcd4cf85454412c2d0fb6524576" + +response-stream@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/response-stream/-/response-stream-0.0.0.tgz#da4b17cc7684c98c962beb4d95f668c8dcad09d5" + +rfile@~1.0, rfile@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/rfile/-/rfile-1.0.0.tgz#59708cf90ca1e74c54c3cfc5c36fdb9810435261" + dependencies: + callsite "~1.0.0" + resolve "~0.3.0" + +ruglify@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/ruglify/-/ruglify-1.0.0.tgz#dc8930e2a9544a274301cc9972574c0d0986b675" + dependencies: + rfile "~1.0" + uglify-js "~2.2" + +safefs@^3.1.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/safefs/-/safefs-3.2.2.tgz#8170c1444d7038e08caea05a374fae2fa349e15c" + dependencies: + graceful-fs "*" + +scandirectory@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/scandirectory/-/scandirectory-2.5.0.tgz#6ce03f54a090b668e3cbedbf20edf9e310593e72" + dependencies: + ignorefs "^1.0.0" + safefs "^3.1.2" + taskgroup "^4.0.5" + +script-injector@~0.1.0: + version "0.1.7" + resolved "https://registry.yarnpkg.com/script-injector/-/script-injector-0.1.7.tgz#b6dccee237297b37aff575af97fa791525a8d7de" + dependencies: + duplexer "~0.1.1" + through "~2.3.4" + trumpet "~1.6.3" + +shell-quote@~0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-0.0.1.tgz#1a41196f3c0333c482323593d6886ecf153dd986" + +"source-map@>= 0.1.2": + version "0.5.6" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" + +source-map@~0.1.25, source-map@~0.1.7: + version "0.1.43" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" + dependencies: + amdefine ">=0.0.4" + +split@~0.3.0: + version "0.3.3" + resolved "https://registry.yarnpkg.com/split/-/split-0.3.3.tgz#cd0eea5e63a211dfff7eb0f091c4133e2d0dd28f" + dependencies: + through "2" + +split@0.2: + version "0.2.10" + resolved "https://registry.yarnpkg.com/split/-/split-0.2.10.tgz#67097c601d697ce1368f418f06cd201cf0521a57" + dependencies: + through "2" + +sse-stream@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/sse-stream/-/sse-stream-0.0.4.tgz#81da2fe15c5400e68248df3d1d0ce0207b87ff1f" + dependencies: + through "~2.2.7" + +stream-combiner@~0.0.3: + version "0.0.4" + resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14" + dependencies: + duplexer "~0.1.1" + +stream-splicer@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/stream-splicer/-/stream-splicer-1.3.2.tgz#3c0441be15b9bf4e226275e6dc83964745546661" + dependencies: + indexof "0.0.1" + inherits "^2.0.1" + isarray "~0.0.1" + readable-stream "^1.1.13-1" + readable-wrap "^1.0.0" + through2 "^1.0.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + +syntax-error@~0.0.0: + version "0.0.1" + resolved "https://registry.yarnpkg.com/syntax-error/-/syntax-error-0.0.1.tgz#019d075348cd8c5b79f0603c73e53891a7c5235d" + dependencies: + esprima "~0.9.9" + +tape@~0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/tape/-/tape-0.2.2.tgz#64ccfa4b7ecf4a0060007e61716d424781671637" + dependencies: + deep-equal "~0.0.0" + defined "~0.0.0" + jsonify "~0.0.0" + +tape@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/tape/-/tape-1.0.4.tgz#e2e8e5c6dd3f00fdc2a5e4514f62fc221e59f9c4" + dependencies: + deep-equal "~0.0.0" + defined "~0.0.0" + jsonify "~0.0.0" + through "~2.3.4" + +taskgroup@^4.0.5, taskgroup@^4.2.0: + version "4.3.1" + resolved "https://registry.yarnpkg.com/taskgroup/-/taskgroup-4.3.1.tgz#7de193febd768273c457730497024d512c27915a" + dependencies: + ambi "^2.2.0" + csextends "^1.0.3" + +through@~2.2.0, through@~2.2.7: + version "2.2.7" + resolved "https://registry.yarnpkg.com/through/-/through-2.2.7.tgz#6e8e21200191d4eb6a99f6f010df46aa1c6eb2bd" + +through@~2.3, through@~2.3.1, through@~2.3.4, through@2, through@X.X.X: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + +through2@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/through2/-/through2-1.1.1.tgz#0847cbc4449f3405574dbdccd9bb841b83ac3545" + dependencies: + readable-stream ">=1.1.13-1 <1.2.0-0" + xtend ">=4.0.0 <4.1.0-0" + +through2@~0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/through2/-/through2-0.4.2.tgz#dbf5866031151ec8352bb6c4db64a2292a840b9b" + dependencies: + readable-stream "~1.0.17" + xtend "~2.1.1" + +to-utf8@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/to-utf8/-/to-utf8-0.0.1.tgz#d17aea72ff2fba39b9e43601be7b3ff72e089852" + +trumpet@~1.6.3: + version "1.6.6" + resolved "https://registry.yarnpkg.com/trumpet/-/trumpet-1.6.6.tgz#e8eabd47c958b560a1206d9b9b6c84b47ea803e4" + dependencies: + duplexer2 "~0.0.2" + html-select "^2.3.5" + html-tokenize "^1.1.1" + inherits "^2.0.0" + readable-stream "^1.0.27-1" + through2 "^1.0.0" + +typechecker@^2.0.8: + version "2.1.0" + resolved "https://registry.yarnpkg.com/typechecker/-/typechecker-2.1.0.tgz#d1c2093a54ff8a19f58cff877eeaa54f2242d383" + +typechecker@^4.3.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/typechecker/-/typechecker-4.4.0.tgz#efc56882d36e435c6eb978200e22b88278a3f7fc" + dependencies: + editions "^1.3.3" + +typechecker@~2.0.1: + version "2.0.8" + resolved "https://registry.yarnpkg.com/typechecker/-/typechecker-2.0.8.tgz#e83da84bb64c584ccb345838576c40b0337db82e" + +uglify-js@~2.2, uglify-js@~2.2.5: + version "2.2.5" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.2.5.tgz#a6e02a70d839792b9780488b7b8b184c095c99c7" + dependencies: + optimist "~0.3.5" + source-map "~0.1.7" + +umd@~1.1.0: + version "1.1.1" + resolved "http://registry.npmjs.org/umd/-/umd-1.1.1.tgz#481b64655b1b3db0c1f3910225c3804fc6d7ec58" + dependencies: + rfile "~1.0.0" + ruglify "~1.0.0" + through "~2.3.1" + uglify-js "~2.2.5" + +vm-browserify@0.0.x: + version "0.0.4" + resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" + dependencies: + indexof "0.0.1" + +watchr@~2.4.3: + version "2.4.13" + resolved "https://registry.yarnpkg.com/watchr/-/watchr-2.4.13.tgz#d74847bb4d6f90f61fe2c74f9f68662aa0e07601" + dependencies: + eachr "^2.0.2" + extendr "^2.1.0" + extract-opts "^2.2.0" + ignorefs "^1.0.0" + safefs "^3.1.2" + scandirectory "^2.5.0" + taskgroup "^4.2.0" + typechecker "^2.0.8" + +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + +"xtend@>=4.0.0 <4.1.0-0": + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +xtend@~2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b" + dependencies: + object-keys "~0.4.0" + +zlib-browserify@0.0.x: + version "0.0.3" + resolved "https://registry.yarnpkg.com/zlib-browserify/-/zlib-browserify-0.0.3.tgz#240ccdbfd0203fa842b130deefb1414122c8cc50" + dependencies: + tape "~0.2.2" +