fsevents 0.3.8 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of fsevents might be problematic. Click here for more details.
- package/.npmignore +1 -0
- package/.travis.yml +81 -6
- package/Readme.md +1 -1
- package/binding.gyp +9 -1
- package/fsevents.js +4 -1
- package/node_modules/node-pre-gyp/CHANGELOG.md +234 -0
- package/node_modules/node-pre-gyp/LICENSE +27 -0
- package/node_modules/node-pre-gyp/README.md +581 -0
- package/node_modules/node-pre-gyp/appveyor.yml +30 -0
- package/node_modules/node-pre-gyp/bin/node-pre-gyp +131 -0
- package/node_modules/node-pre-gyp/bin/node-pre-gyp.cmd +2 -0
- package/node_modules/node-pre-gyp/lib/build.js +43 -0
- package/node_modules/node-pre-gyp/lib/clean.js +23 -0
- package/node_modules/node-pre-gyp/lib/configure.js +48 -0
- package/node_modules/node-pre-gyp/lib/info.js +40 -0
- package/node_modules/node-pre-gyp/lib/install.js +205 -0
- package/node_modules/node-pre-gyp/lib/node-pre-gyp.js +192 -0
- package/node_modules/node-pre-gyp/lib/package.js +46 -0
- package/node_modules/node-pre-gyp/lib/pre-binding.js +25 -0
- package/node_modules/node-pre-gyp/lib/publish.js +77 -0
- package/node_modules/node-pre-gyp/lib/rebuild.js +13 -0
- package/node_modules/node-pre-gyp/lib/reinstall.js +13 -0
- package/node_modules/node-pre-gyp/lib/reveal.js +31 -0
- package/node_modules/node-pre-gyp/lib/testbinary.js +73 -0
- package/node_modules/node-pre-gyp/lib/testpackage.js +49 -0
- package/node_modules/node-pre-gyp/lib/unpublish.js +41 -0
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +522 -0
- package/node_modules/node-pre-gyp/lib/util/compile.js +87 -0
- package/node_modules/node-pre-gyp/lib/util/handle_gyp_opts.js +94 -0
- package/node_modules/node-pre-gyp/lib/util/nw-pre-gyp/index.html +26 -0
- package/node_modules/node-pre-gyp/lib/util/nw-pre-gyp/package.json +9 -0
- package/node_modules/node-pre-gyp/lib/util/s3_setup.js +27 -0
- package/node_modules/node-pre-gyp/lib/util/versioning.js +276 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/.travis.yml +8 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/LICENSE +21 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/bin/cmd.js +33 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/bin/usage.txt +12 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/examples/pow.js +6 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/index.js +98 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist/.travis.yml +4 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist/LICENSE +18 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist/example/parse.js +2 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist/index.js +187 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist/package.json +66 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist/readme.markdown +73 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist/test/dash.js +24 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist/test/default_bool.js +20 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist/test/dotted.js +16 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist/test/long.js +31 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist/test/parse.js +318 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js +9 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist/test/short.js +67 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist/test/whitespace.js +8 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/package.json +60 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/readme.markdown +100 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/test/chmod.js +41 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/test/clobber.js +38 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/test/mkdirp.js +28 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/test/opts_fs.js +29 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/test/opts_fs_sync.js +27 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/test/perm.js +32 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/test/perm_sync.js +36 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/test/race.js +37 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/test/rel.js +32 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/test/return.js +25 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/test/return_sync.js +24 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/test/root.js +19 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/test/sync.js +32 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/test/umask.js +28 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/test/umask_sync.js +32 -0
- package/node_modules/node-pre-gyp/node_modules/nopt/.npmignore +1 -0
- package/node_modules/node-pre-gyp/node_modules/nopt/.travis.yml +9 -0
- package/node_modules/node-pre-gyp/node_modules/nopt/LICENSE +15 -0
- package/node_modules/node-pre-gyp/node_modules/nopt/README.md +210 -0
- package/node_modules/node-pre-gyp/node_modules/nopt/bin/nopt.js +54 -0
- package/node_modules/node-pre-gyp/node_modules/nopt/examples/my-program.js +30 -0
- package/node_modules/node-pre-gyp/node_modules/nopt/lib/nopt.js +414 -0
- package/node_modules/node-pre-gyp/node_modules/nopt/node_modules/abbrev/.npmignore +4 -0
- package/node_modules/node-pre-gyp/node_modules/nopt/node_modules/abbrev/.travis.yml +5 -0
- package/node_modules/node-pre-gyp/node_modules/nopt/node_modules/abbrev/CONTRIBUTING.md +3 -0
- package/node_modules/node-pre-gyp/node_modules/nopt/node_modules/abbrev/LICENSE +15 -0
- package/node_modules/node-pre-gyp/node_modules/nopt/node_modules/abbrev/README.md +23 -0
- package/node_modules/node-pre-gyp/node_modules/nopt/node_modules/abbrev/abbrev.js +62 -0
- package/node_modules/node-pre-gyp/node_modules/nopt/node_modules/abbrev/package.json +48 -0
- package/node_modules/node-pre-gyp/node_modules/nopt/node_modules/abbrev/test.js +47 -0
- package/node_modules/node-pre-gyp/node_modules/nopt/package.json +55 -0
- package/node_modules/node-pre-gyp/node_modules/nopt/test/basic.js +251 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/LICENSE +15 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/README.md +195 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/example.js +39 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/log.js +247 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/ansi/.jshintrc +4 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/ansi/.npmignore +1 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/ansi/History.md +16 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/ansi/README.md +98 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/ansi/examples/beep/index.js +16 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/ansi/examples/clear/index.js +15 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/ansi/examples/cursorPosition.js +32 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/ansi/examples/progress/index.js +87 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/ansi/lib/ansi.js +405 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/ansi/lib/newlines.js +71 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/ansi/package.json +54 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/.npmignore +3 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/README.md +183 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/index.js +130 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/.npmignore +1 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/History.md +16 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/Makefile +8 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/Readme.md +94 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/index.js +121 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/package.json +48 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/delegates/test/index.js +94 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/.npmignore +5 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/LICENSE +18 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/README.md +15 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/duplex.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/float.patch +923 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_duplex.js +89 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_passthrough.js +46 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_readable.js +951 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_transform.js +209 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/lib/_stream_writable.js +477 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/README.md +3 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/float.patch +604 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +107 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/package.json +54 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/util.js +106 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/inherits/LICENSE +16 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/inherits/README.md +42 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/inherits/inherits.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/inherits/inherits_browser.js +23 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/inherits/package.json +50 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/inherits/test.js +25 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray/README.md +54 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray/build/build.js +209 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray/component.json +19 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray/index.js +3 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/isarray/package.json +53 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder/.npmignore +2 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder/LICENSE +20 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder/README.md +7 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder/index.js +221 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/string_decoder/package.json +54 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/package.json +70 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/passthrough.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/readable.js +7 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/transform.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/writable.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/package.json +51 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/tracker.js +56 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/trackergroup.js +87 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/test/trackerstream.js +65 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/.npmignore +32 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/LICENSE +13 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/README.md +166 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/README.md~ +161 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/example.png +0 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/.npmignore +32 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/LICENSE +14 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/README.md +40 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/README.md~ +4 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/index.js +18 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/package.json +53 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/has-unicode/test/index.js +26 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/LICENSE +22 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/README.md +20 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/index.js +55 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/LICENSE +22 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/README.md +20 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/index.js +22 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._basetostring/package.json +88 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/LICENSE +22 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/README.md +20 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/index.js +37 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/node_modules/lodash.repeat/LICENSE +22 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/node_modules/lodash.repeat/README.md +20 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/node_modules/lodash.repeat/index.js +55 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json +97 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/node_modules/lodash._createpadding/package.json +91 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.pad/package.json +98 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/LICENSE.txt +22 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/README.md +20 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/index.js +50 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._basetostring/LICENSE +22 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._basetostring/README.md +20 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._basetostring/index.js +22 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._basetostring/package.json +88 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/LICENSE +22 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/README.md +20 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/index.js +37 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/LICENSE +22 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/README.md +20 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/index.js +55 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json +97 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/node_modules/lodash._createpadding/package.json +91 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padleft/package.json +98 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/LICENSE.txt +22 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/README.md +20 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/index.js +50 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._basetostring/LICENSE +22 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._basetostring/README.md +20 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._basetostring/index.js +22 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._basetostring/package.json +88 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/LICENSE +22 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/README.md +20 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/index.js +37 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/LICENSE +22 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/README.md +20 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/index.js +55 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/node_modules/lodash.repeat/package.json +97 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/node_modules/lodash._createpadding/package.json +91 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/lodash.padright/package.json +98 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/package.json +60 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/progress-bar.js +226 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/test/progress-bar.js +176 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/package.json +58 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/test/basic.js +228 -0
- package/node_modules/node-pre-gyp/node_modules/npmlog/test/progress.js +114 -0
- package/node_modules/node-pre-gyp/node_modules/rc/.npmignore +3 -0
- package/node_modules/node-pre-gyp/node_modules/rc/LICENSE.APACHE2 +15 -0
- package/node_modules/node-pre-gyp/node_modules/rc/LICENSE.BSD +26 -0
- package/node_modules/node-pre-gyp/node_modules/rc/LICENSE.MIT +24 -0
- package/node_modules/node-pre-gyp/node_modules/rc/README.md +149 -0
- package/node_modules/node-pre-gyp/node_modules/rc/browser.js +7 -0
- package/node_modules/node-pre-gyp/node_modules/rc/index.js +60 -0
- package/node_modules/node-pre-gyp/node_modules/rc/lib/utils.js +101 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/deep-extend/.npmignore +1 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/deep-extend/LICENSE +20 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/deep-extend/README.md +52 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/deep-extend/index.js +90 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/deep-extend/package.json +59 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/deep-extend/test/index.spec.js +57 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/deep-extend/test/mocha.opts +1 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/ini/README.md +102 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/ini/ini.js +190 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/ini/package.json +56 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/.travis.yml +8 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/LICENSE +18 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/example/parse.js +2 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/index.js +224 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/package.json +70 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/readme.markdown +91 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/test/all_bool.js +32 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/test/bool.js +143 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/test/dash.js +31 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/test/default_bool.js +35 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/test/dotted.js +22 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/test/long.js +31 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/test/num.js +36 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/test/parse.js +197 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/test/parse_modified.js +9 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/test/short.js +67 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/test/stop_early.js +15 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/test/unknown.js +102 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/test/whitespace.js +8 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/strip-json-comments/cli.js +41 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/strip-json-comments/package.json +77 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/strip-json-comments/readme.md +74 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/strip-json-comments/strip-json-comments.js +64 -0
- package/node_modules/node-pre-gyp/node_modules/rc/package.json +61 -0
- package/node_modules/node-pre-gyp/node_modules/rc/test/ini.js +16 -0
- package/node_modules/node-pre-gyp/node_modules/rc/test/nested-env-vars.js +39 -0
- package/node_modules/node-pre-gyp/node_modules/rc/test/test.js +59 -0
- package/node_modules/node-pre-gyp/node_modules/request/.eslintrc +45 -0
- package/node_modules/node-pre-gyp/node_modules/request/.npmignore +3 -0
- package/node_modules/node-pre-gyp/node_modules/request/.travis.yml +14 -0
- package/node_modules/node-pre-gyp/node_modules/request/CHANGELOG.md +512 -0
- package/node_modules/node-pre-gyp/node_modules/request/CONTRIBUTING.md +44 -0
- package/node_modules/node-pre-gyp/node_modules/request/LICENSE +55 -0
- package/node_modules/node-pre-gyp/node_modules/request/README.md +1063 -0
- package/node_modules/node-pre-gyp/node_modules/request/disabled.appveyor.yml +36 -0
- package/node_modules/node-pre-gyp/node_modules/request/examples/README.md +115 -0
- package/node_modules/node-pre-gyp/node_modules/request/index.js +152 -0
- package/node_modules/node-pre-gyp/node_modules/request/lib/auth.js +153 -0
- package/node_modules/node-pre-gyp/node_modules/request/lib/cookies.js +39 -0
- package/node_modules/node-pre-gyp/node_modules/request/lib/getProxyFromURI.js +79 -0
- package/node_modules/node-pre-gyp/node_modules/request/lib/har.js +205 -0
- package/node_modules/node-pre-gyp/node_modules/request/lib/helpers.js +74 -0
- package/node_modules/node-pre-gyp/node_modules/request/lib/multipart.js +109 -0
- package/node_modules/node-pre-gyp/node_modules/request/lib/oauth.js +147 -0
- package/node_modules/node-pre-gyp/node_modules/request/lib/querystring.js +51 -0
- package/node_modules/node-pre-gyp/node_modules/request/lib/redirect.js +154 -0
- package/node_modules/node-pre-gyp/node_modules/request/lib/tunnel.js +183 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/aws-sign2/LICENSE +55 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/aws-sign2/README.md +4 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/aws-sign2/index.js +202 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/aws-sign2/package.json +47 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/.jshintrc +59 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/.npmignore +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/.travis.yml +14 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/LICENSE.md +13 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/README.md +200 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/bl.js +216 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/.npmignore +5 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/.travis.yml +39 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/.zuul.yml +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/LICENSE +18 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/README.md +36 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/doc/stream.markdown +1651 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +60 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/duplex.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js +82 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js +27 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js +959 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js +197 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js +520 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/README.md +3 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/float.patch +604 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +107 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json +54 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/util.js +106 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/inherits/LICENSE +16 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/inherits/README.md +42 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/inherits/inherits.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/inherits/inherits_browser.js +23 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/inherits/package.json +50 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/inherits/test.js +25 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/README.md +54 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/build/build.js +209 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/component.json +19 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/index.js +3 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/package.json +53 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml +7 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/index.js +13 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/package.json +44 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/readme.md +18 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/test.js +17 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/.npmignore +2 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/LICENSE +20 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/README.md +7 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/index.js +221 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json +54 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/History.md +11 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/LICENSE +24 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/README.md +53 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/browser.js +62 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/node.js +6 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/package.json +53 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/package.json +74 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/passthrough.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/readable.js +12 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/transform.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/writable.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/package.json +61 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/test/basic-test.js +541 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/test/sauce.js +38 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/test/test.js +9 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/caseless/LICENSE +28 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/caseless/README.md +45 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/caseless/index.js +66 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/caseless/package.json +61 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/caseless/test.js +40 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/combined-stream/License +19 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/combined-stream/Readme.md +138 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/combined-stream/lib/combined_stream.js +188 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/.npmignore +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/License +19 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/Makefile +7 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/Readme.md +141 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/combined-stream/node_modules/delayed-stream/package.json +64 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/combined-stream/package.json +67 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/extend/.eslintrc +192 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/extend/.jscs.json +104 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/extend/.npmignore +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/extend/.travis.yml +44 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/extend/CHANGELOG.md +69 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/extend/LICENSE +23 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/extend/README.md +62 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/extend/component.json +32 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/extend/index.js +86 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/extend/package.json +72 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/forever-agent/LICENSE +55 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/forever-agent/README.md +4 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/forever-agent/index.js +138 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/forever-agent/package.json +56 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/License +19 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/Readme.md +175 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/lib/browser.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/lib/form_data.js +351 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/.jscsrc +3 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/CHANGELOG.md +81 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/LICENSE +19 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/README.md +1789 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js +1216 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/package.json +105 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/support/sync-package-managers.js +53 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/package.json +76 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/README.md +362 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/bin/har-validator +45 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/lib/error.js +10 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/lib/index.js +39 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/lib/schemas/cache.json +13 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/lib/schemas/cacheEntry.json +31 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/lib/schemas/content.json +27 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/lib/schemas/cookie.json +34 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/lib/schemas/creator.json +18 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/lib/schemas/entry.json +51 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/lib/schemas/har.json +11 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/lib/schemas/index.js +49 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/lib/schemas/log.json +34 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/lib/schemas/page.json +30 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/lib/schemas/pageTimings.json +16 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/lib/schemas/postData.json +41 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/lib/schemas/record.json +18 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/lib/schemas/request.json +55 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/lib/schemas/response.json +52 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/lib/schemas/timings.json +40 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/README.md +676 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/browser/bluebird.js +4857 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/browser/bluebird.min.js +31 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/any.js +21 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/assert.js +55 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/async.js +150 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/bind.js +72 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/bluebird.js +11 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/call_get.js +123 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/cancel.js +48 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/captured_trace.js +493 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/catch_filter.js +66 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/context.js +38 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/debuggability.js +160 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/direct_resolve.js +61 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/each.js +12 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/errors.js +111 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/es5.js +80 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/filter.js +12 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/finally.js +98 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/generators.js +136 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/join.js +107 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/map.js +133 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/method.js +44 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/nodeify.js +59 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/progress.js +76 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promise.js +750 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promise_array.js +142 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promise_resolver.js +123 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promisify.js +302 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/props.js +79 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/queue.js +90 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/race.js +47 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/reduce.js +148 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/schedule.js +35 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/settle.js +40 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/some.js +125 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/synchronous_inspection.js +94 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/thenables.js +84 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/timers.js +58 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/using.js +202 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/util.js +321 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/package.json +99 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/index.js +116 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/ansi-styles/index.js +65 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/ansi-styles/package.json +80 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/ansi-styles/readme.md +86 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/index.js +11 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/package.json +70 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/readme.md +27 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/index.js +4 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/index.js +4 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/package.json +86 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/readme.md +31 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/package.json +85 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/has-ansi/readme.md +36 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/strip-ansi/index.js +6 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/index.js +4 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/package.json +86 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/readme.md +31 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/strip-ansi/package.json +85 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/strip-ansi/readme.md +33 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/index.js +50 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/package.json +79 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/supports-color/readme.md +36 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/package.json +96 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/readme.md +212 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/commander/Readme.md +342 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/commander/index.js +1103 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/.npmignore +3 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/.travis.yml +5 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/LICENSE +22 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/README.md +17 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/index.js +12 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/commander/node_modules/graceful-readlink/package.json +48 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/commander/package.json +75 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/.npmignore +2 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/.travis.yml +3 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/LICENSE +21 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/README.md +173 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/example.js +18 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/formats.js +14 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/index.js +573 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/.npmignore +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/.travis.yml +3 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/README.md +72 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/example.js +27 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/index.js +61 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/package.json +53 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/test.js +33 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/.npmignore +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/.travis.yml +3 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/LICENSE +21 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/README.md +19 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/index.js +12 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/.npmignore +17 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/LICENSE +22 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/README.md +28 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/is-property.js +5 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property/package.json +59 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/package.json +51 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/test.js +12 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/.travis.yml +6 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/README.md +31 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/jsonpointer.js +79 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/package.json +60 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/test.js +100 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/.jshintrc +30 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/.npmignore +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/LICENCE +19 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/Makefile +4 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/README.md +32 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/immutable.js +17 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/mutable.js +15 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/package.json +88 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/xtend/test.js +63 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json +66 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/require.js +12 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/fixtures/cosmic.js +84 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/additionalItems.json +82 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/additionalProperties.json +88 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/allOf.json +112 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/anyOf.json +68 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/bignum.json +107 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/default.json +49 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/definitions.json +32 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/dependencies.json +113 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/enum.json +72 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/format.json +143 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/items.json +46 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/maxItems.json +28 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/maxLength.json +28 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/maxProperties.json +28 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/maximum.json +42 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/minItems.json +28 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/minLength.json +28 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/minProperties.json +28 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/minimum.json +42 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/multipleOf.json +60 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/not.json +96 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/nullAndFormat.json +18 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/nullAndObject.json +18 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/oneOf.json +68 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/pattern.json +23 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/patternProperties.json +110 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/properties.json +92 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/ref.json +128 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/refRemote.json +74 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/required.json +39 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/type.json +330 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema-draft4/uniqueItems.json +79 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/json-schema.js +23 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/test/misc.js +429 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/package.json +87 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/.npmignore +20 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/.travis.yml +5 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/LICENSE +28 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/README.md +634 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/bower.json +24 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/component.json +19 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/example/usage.js +78 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/images/hawk.png +0 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/images/logo.png +0 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/lib/browser.js +643 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/lib/client.js +369 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/lib/crypto.js +126 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/lib/index.js +15 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/lib/server.js +540 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/lib/utils.js +164 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/.npmignore +18 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml +7 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/CONTRIBUTING.md +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE +28 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/README.md +597 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/images/boom.png +0 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js +301 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/package.json +64 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js +616 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore +18 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml +5 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE +28 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile +9 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md +14 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js +68 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json +65 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js +108 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore +18 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml +7 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/CONTRIBUTING.md +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE +31 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile +8 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/README.md +574 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png +0 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/index.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js +132 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js +977 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/package.json +60 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js +88 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js +2425 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/ignore.txt +0 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/sntp/.npmignore +18 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/sntp/.travis.yml +5 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE +28 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile +9 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/sntp/README.md +68 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js +16 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/sntp/examples/time.js +25 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/sntp/index.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js +412 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/sntp/package.json +65 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/sntp/test/index.js +435 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/package.json +67 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/test/browser.js +1459 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/test/client.js +440 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/test/crypto.js +70 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/test/index.js +378 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/test/readme.js +95 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/test/server.js +1314 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/test/uri.js +849 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/test/utils.js +121 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/.dir-locals.el +6 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/.npmignore +7 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/LICENSE +18 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/README.md +79 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/http_signing.md +296 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/lib/index.js +27 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/lib/parser.js +304 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/lib/signer.js +178 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/lib/util.js +306 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/lib/verify.js +56 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/asn1/.npmignore +2 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/asn1/LICENSE +19 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/asn1/README.md +50 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/errors.js +13 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/index.js +27 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js +267 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/types.js +36 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/writer.js +317 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js +20 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json +63 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/reader.test.js +172 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js +296 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md +126 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js +245 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json +46 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/ctype/.npmignore +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG +78 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE +24 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/ctype/README +82 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/ctype/README.old +298 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/ctype/ctf.js +245 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/ctype/ctio.js +1485 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/ctype/ctype.js +944 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/ctype/man/man3ctype/ctio.3ctype +241 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json +43 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsl.conf +129 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsstyle +839 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/package.json +77 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/isstream/.jshintrc +59 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/isstream/.npmignore +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/isstream/.travis.yml +12 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/isstream/LICENSE.md +11 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/isstream/README.md +66 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/isstream/isstream.js +27 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/isstream/package.json +59 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/isstream/test.js +168 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/json-stringify-safe/.npmignore +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/json-stringify-safe/CHANGELOG.md +14 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/json-stringify-safe/LICENSE +15 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/json-stringify-safe/Makefile +35 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/json-stringify-safe/README.md +52 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/json-stringify-safe/package.json +68 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/json-stringify-safe/stringify.js +27 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/json-stringify-safe/test/mocha.opts +2 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/json-stringify-safe/test/stringify_test.js +246 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/HISTORY.md +147 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/LICENSE +23 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/README.md +103 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/index.js +188 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md +241 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/node_modules/mime-db/LICENSE +22 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/node_modules/mime-db/README.md +82 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json +6424 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/node_modules/mime-db/index.js +11 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json +94 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/package.json +84 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/node-uuid/.npmignore +2 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/node-uuid/LICENSE.md +21 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/node-uuid/README.md +243 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/node-uuid/benchmark/README.md +53 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/node-uuid/benchmark/bench.gnu +174 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/node-uuid/benchmark/bench.sh +34 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c +34 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/node-uuid/benchmark/benchmark.js +84 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/node-uuid/bin/uuid +26 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/node-uuid/bower.json +23 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/node-uuid/component.json +18 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/node-uuid/package.json +65 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/node-uuid/test/compare_v1.js +63 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/node-uuid/test/test.html +17 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/node-uuid/test/test.js +228 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/node-uuid/uuid.js +247 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/oauth-sign/LICENSE +55 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/oauth-sign/README.md +4 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/oauth-sign/index.js +134 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/oauth-sign/package.json +59 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/oauth-sign/test.js +89 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/.eslintignore +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/.npmignore +19 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/.travis.yml +6 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/CHANGELOG.md +88 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/CONTRIBUTING.md +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/LICENSE +28 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/README.md +317 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/bower.json +22 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/lib/index.js +15 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/lib/parse.js +186 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/lib/stringify.js +121 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/lib/utils.js +190 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/package.json +56 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/test/parse.js +478 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/test/stringify.js +259 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/test/utils.js +28 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/stringstream/.npmignore +15 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/stringstream/.travis.yml +4 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/stringstream/LICENSE.txt +4 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/stringstream/README.md +38 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/stringstream/example.js +27 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/stringstream/package.json +49 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/stringstream/stringstream.js +102 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/.editorconfig +12 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/.jshintrc +70 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/.npmignore +4 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/.travis.yml +9 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/LICENSE +74 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/README.md +486 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js +293 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/lib/cookie.js +1309 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/lib/memstore.js +170 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/lib/pathMatch.js +61 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/lib/permuteDomain.js +56 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js +98 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/lib/store.js +71 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/package.json +66 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/public-suffix.txt +10309 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/api_test.js +372 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/cookie_jar_test.js +468 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/cookie_sorting_test.js +156 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/cookie_to_json_test.js +164 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/cookie_to_string_test.js +162 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/date_test.js +79 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/domain_and_path_test.js +201 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/ietf_data/dates/bsd-examples.json +168 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/ietf_data/dates/examples.json +48 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/ietf_data/parser.json +1959 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/ietf_test.js +105 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/jar_serialization_test.js +348 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/lifetime_test.js +97 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/parsing_test.js +294 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tough-cookie/test/regression_test.js +143 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tunnel-agent/.jshintrc +5 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tunnel-agent/LICENSE +55 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tunnel-agent/README.md +4 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tunnel-agent/index.js +241 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/tunnel-agent/package.json +60 -0
- package/node_modules/node-pre-gyp/node_modules/request/package.json +111 -0
- package/node_modules/node-pre-gyp/node_modules/request/release.sh +45 -0
- package/node_modules/node-pre-gyp/node_modules/request/request.js +1408 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/LICENSE +15 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/README.md +38 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/bin.js +40 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/README.md +377 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/common.js +245 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/glob.js +752 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/inflight/.eslintrc +17 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/inflight/LICENSE +15 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/inflight/README.md +37 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/inflight/inflight.js +44 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE +15 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md +36 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json +52 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/test/basic.js +51 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js +33 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json +61 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/inflight/test.js +97 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/inherits/LICENSE +16 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/inherits/README.md +42 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits_browser.js +23 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json +50 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/inherits/test.js +25 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/README.md +216 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/browser.js +1159 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js +912 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore +2 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.travis.yml +3 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +121 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js +8 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +191 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +2 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml +4 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +6 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +80 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +5 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +38 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +73 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +56 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml +4 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE +18 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown +62 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js +6 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js +13 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +83 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js +39 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +75 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-comparison.js +32 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-results.txt +1075 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/cases.txt +182 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/dollar.js +9 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js +10 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/generate.sh +24 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/negative-increment.js +15 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js +16 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js +10 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js +13 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/same-type.js +7 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js +50 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json +62 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/once/LICENSE +15 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/once/README.md +51 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE +15 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/README.md +36 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/package.json +52 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js +51 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js +33 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/once/once.js +21 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/once/package.json +60 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/once/test/once.js +23 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/index.js +20 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json +70 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/readme.md +51 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/package.json +72 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/sync.js +460 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/package.json +61 -0
- package/node_modules/node-pre-gyp/node_modules/rimraf/rimraf.js +333 -0
- package/node_modules/node-pre-gyp/node_modules/semver/.npmignore +4 -0
- package/node_modules/node-pre-gyp/node_modules/semver/.travis.yml +5 -0
- package/node_modules/node-pre-gyp/node_modules/semver/LICENSE +15 -0
- package/node_modules/node-pre-gyp/node_modules/semver/README.md +303 -0
- package/node_modules/node-pre-gyp/node_modules/semver/bin/semver +133 -0
- package/node_modules/node-pre-gyp/node_modules/semver/package.json +52 -0
- package/node_modules/node-pre-gyp/node_modules/semver/semver.js +1199 -0
- package/node_modules/node-pre-gyp/node_modules/semver/test/big-numbers.js +31 -0
- package/node_modules/node-pre-gyp/node_modules/semver/test/clean.js +29 -0
- package/node_modules/node-pre-gyp/node_modules/semver/test/gtr.js +173 -0
- package/node_modules/node-pre-gyp/node_modules/semver/test/index.js +685 -0
- package/node_modules/node-pre-gyp/node_modules/semver/test/ltr.js +181 -0
- package/node_modules/node-pre-gyp/node_modules/semver/test/major-minor-patch.js +72 -0
- package/node_modules/node-pre-gyp/node_modules/tar/.npmignore +5 -0
- package/node_modules/node-pre-gyp/node_modules/tar/.travis.yml +4 -0
- package/node_modules/node-pre-gyp/node_modules/tar/LICENSE +12 -0
- package/node_modules/node-pre-gyp/node_modules/tar/README.md +50 -0
- package/node_modules/node-pre-gyp/node_modules/tar/examples/extracter.js +19 -0
- package/node_modules/node-pre-gyp/node_modules/tar/examples/packer.js +24 -0
- package/node_modules/node-pre-gyp/node_modules/tar/examples/reader.js +36 -0
- package/node_modules/node-pre-gyp/node_modules/tar/lib/buffer-entry.js +30 -0
- package/node_modules/node-pre-gyp/node_modules/tar/lib/entry-writer.js +169 -0
- package/node_modules/node-pre-gyp/node_modules/tar/lib/entry.js +213 -0
- package/node_modules/node-pre-gyp/node_modules/tar/lib/extended-header-writer.js +191 -0
- package/node_modules/node-pre-gyp/node_modules/tar/lib/extended-header.js +140 -0
- package/node_modules/node-pre-gyp/node_modules/tar/lib/extract.js +94 -0
- package/node_modules/node-pre-gyp/node_modules/tar/lib/global-header-writer.js +14 -0
- package/node_modules/node-pre-gyp/node_modules/tar/lib/header.js +385 -0
- package/node_modules/node-pre-gyp/node_modules/tar/lib/pack.js +236 -0
- package/node_modules/node-pre-gyp/node_modules/tar/lib/parse.js +271 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/block-stream/LICENCE +25 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/block-stream/LICENSE +15 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/block-stream/README.md +14 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/block-stream/bench/block-stream-pause.js +70 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/block-stream/bench/block-stream.js +68 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/block-stream/bench/dropper-pause.js +70 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/block-stream/bench/dropper.js +68 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/block-stream/block-stream.js +209 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/block-stream/package.json +55 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/block-stream/test/basic.js +27 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/block-stream/test/nopad-thorough.js +68 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/block-stream/test/nopad.js +57 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/block-stream/test/pause-resume.js +73 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/block-stream/test/thorough.js +68 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/block-stream/test/two-stream.js +59 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/.npmignore +5 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/.travis.yml +9 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/LICENSE +15 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/README.md +76 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/examples/filter-pipe.js +134 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/examples/pipe.js +118 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/examples/reader.js +68 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/examples/symlink-write.js +27 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/fstream.js +35 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/lib/abstract.js +85 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/lib/collect.js +68 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/lib/dir-reader.js +252 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/lib/dir-writer.js +174 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/lib/file-reader.js +150 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/lib/file-writer.js +107 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/lib/get-type.js +33 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/lib/link-reader.js +53 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/lib/link-writer.js +95 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/lib/proxy-reader.js +95 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/lib/proxy-writer.js +111 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/lib/reader.js +255 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/lib/socket-reader.js +36 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/lib/writer.js +390 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/.npmignore +1 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/LICENSE +15 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/README.md +36 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/fs.js +11 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/graceful-fs.js +158 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/package.json +72 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/polyfills.js +255 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/test/max-open.js +69 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/test/open.js +39 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/test/readdir-sort.js +20 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/test/write-then-read.js +47 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/package.json +67 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/inherits/LICENSE +16 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/inherits/README.md +42 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/inherits/inherits.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/inherits/inherits_browser.js +23 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/inherits/package.json +50 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/inherits/test.js +25 -0
- package/node_modules/node-pre-gyp/node_modules/tar/package.json +61 -0
- package/node_modules/node-pre-gyp/node_modules/tar/tar.js +173 -0
- package/node_modules/node-pre-gyp/node_modules/tar/test/00-setup-fixtures.js +53 -0
- package/node_modules/node-pre-gyp/node_modules/tar/test/cb-never-called-1.0.1.tgz +0 -0
- package/node_modules/node-pre-gyp/node_modules/tar/test/dir-normalization.js +177 -0
- package/node_modules/node-pre-gyp/node_modules/tar/test/dir-normalization.tar +0 -0
- package/node_modules/node-pre-gyp/node_modules/tar/test/error-on-broken.js +33 -0
- package/node_modules/node-pre-gyp/node_modules/tar/test/extract-move.js +132 -0
- package/node_modules/node-pre-gyp/node_modules/tar/test/extract.js +367 -0
- package/node_modules/node-pre-gyp/node_modules/tar/test/fixtures.tgz +0 -0
- package/node_modules/node-pre-gyp/node_modules/tar/test/header.js +183 -0
- package/node_modules/node-pre-gyp/node_modules/tar/test/pack-no-proprietary.js +886 -0
- package/node_modules/node-pre-gyp/node_modules/tar/test/pack.js +952 -0
- package/node_modules/node-pre-gyp/node_modules/tar/test/parse.js +359 -0
- package/node_modules/node-pre-gyp/node_modules/tar/test/zz-cleanup.js +20 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/.npmignore +14 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/.travis.yml +4 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/README.md +81 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/index.js +246 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/debug/Readme.md +115 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/debug/debug.js +137 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/debug/index.js +5 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/debug/lib/debug.js +147 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/debug/package.json +63 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/.npmignore +5 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/.travis.yml +3 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/LICENSE +27 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/README.md +76 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/examples/filter-pipe.js +131 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/examples/pipe.js +115 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/examples/reader.js +54 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/examples/symlink-write.js +24 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/fstream.js +31 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/lib/abstract.js +85 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/lib/collect.js +67 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/lib/dir-reader.js +251 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/lib/dir-writer.js +171 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/lib/file-reader.js +147 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/lib/file-writer.js +104 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/lib/get-type.js +32 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/lib/link-reader.js +54 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/lib/link-writer.js +95 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/lib/proxy-reader.js +93 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/lib/proxy-writer.js +109 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/lib/reader.js +262 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/lib/socket-reader.js +38 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/lib/writer.js +389 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/node_modules/graceful-fs/.npmignore +1 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/node_modules/graceful-fs/LICENSE +15 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/node_modules/graceful-fs/README.md +36 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/node_modules/graceful-fs/fs.js +11 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/node_modules/graceful-fs/graceful-fs.js +158 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/node_modules/graceful-fs/package.json +72 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/node_modules/graceful-fs/polyfills.js +255 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/node_modules/graceful-fs/test/max-open.js +69 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/node_modules/graceful-fs/test/open.js +39 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/node_modules/graceful-fs/test/readdir-sort.js +20 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/node_modules/graceful-fs/test/write-then-read.js +47 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/node_modules/inherits/LICENSE +16 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/node_modules/inherits/README.md +42 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/node_modules/inherits/inherits.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/node_modules/inherits/inherits_browser.js +23 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/node_modules/inherits/package.json +50 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/node_modules/inherits/test.js +25 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream/package.json +57 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/.npmignore +1 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/LICENSE +27 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/README.md +22 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/example/basic.js +13 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/ignore.js +275 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/inherits/LICENSE +16 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/inherits/README.md +42 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/inherits/inherits.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/inherits/inherits_browser.js +23 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/inherits/package.json +50 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/inherits/test.js +25 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/.npmignore +1 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/LICENSE +23 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/README.md +218 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/minimatch.js +1055 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/lru-cache/.npmignore +1 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/lru-cache/.travis.yml +8 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS +14 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/lru-cache/LICENSE +15 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/lru-cache/README.md +109 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js +274 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/lru-cache/package.json +58 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/lru-cache/test/basic.js +395 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/lru-cache/test/foreach.js +120 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js +51 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/sigmund/LICENSE +15 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/sigmund/README.md +53 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/sigmund/bench.js +283 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/sigmund/package.json +60 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/sigmund/sigmund.js +39 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/sigmund/test/basic.js +24 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/package.json +57 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/test/basic.js +399 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/test/brace-expand.js +33 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/test/caching.js +14 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/test/defaults.js +274 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/test/extglob-ending-with-state-char.js +8 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/package.json +54 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/test/.ignore +2 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/test/.npmignore +1 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/test/00-setup.js +71 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/test/basic.js +28 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/test/common.js +40 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/test/ignore-most.js +41 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/test/nested-ignores.js +51 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/test/unignore-child.js +38 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/test/zz-cleanup.js +10 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/graceful-fs/.npmignore +1 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/graceful-fs/LICENSE +27 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/graceful-fs/README.md +33 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/graceful-fs/graceful-fs.js +442 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/graceful-fs/package.json +65 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/graceful-fs/test/open.js +46 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/graceful-fs/test/ulimit.js +158 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/once/LICENSE +27 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/once/README.md +33 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/once/once.js +19 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/once/package.json +56 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/once/test/once.js +18 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/.npmignore +5 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/LICENSE +18 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/README.md +15 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/duplex.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_duplex.js +89 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_passthrough.js +46 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_readable.js +982 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_transform.js +210 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_writable.js +386 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/README.md +3 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/float.patch +604 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +107 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/package.json +54 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/util.js +106 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/LICENSE +16 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/README.md +42 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/inherits.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/inherits_browser.js +23 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/package.json +50 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/test.js +25 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/node_modules/isarray/README.md +54 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/node_modules/isarray/build/build.js +209 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/node_modules/isarray/component.json +19 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/node_modules/isarray/index.js +3 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/node_modules/isarray/package.json +53 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/node_modules/string_decoder/.npmignore +2 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/node_modules/string_decoder/LICENSE +20 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/node_modules/string_decoder/README.md +7 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/node_modules/string_decoder/index.js +221 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/node_modules/string_decoder/package.json +54 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/package.json +70 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/passthrough.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/readable.js +8 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/transform.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/writable.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/rimraf/AUTHORS +6 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/rimraf/LICENSE +23 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/rimraf/README.md +30 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/rimraf/bin.js +33 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/rimraf/package.json +73 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/rimraf/rimraf.js +248 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/rimraf/test/run.sh +16 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/rimraf/test/setup.sh +47 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/rimraf/test/test-async.js +5 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/rimraf/test/test-sync.js +3 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/.npmignore +5 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/.travis.yml +3 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/LICENCE +25 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/README.md +48 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/examples/extracter.js +11 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/examples/packer.js +10 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/examples/reader.js +36 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/lib/buffer-entry.js +30 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/lib/entry-writer.js +169 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/lib/entry.js +213 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/lib/extended-header-writer.js +191 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/lib/extended-header.js +140 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/lib/extract.js +78 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/lib/global-header-writer.js +14 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/lib/header.js +385 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/lib/pack.js +231 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/lib/parse.js +271 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/node_modules/block-stream/LICENCE +25 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/node_modules/block-stream/LICENSE +15 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/node_modules/block-stream/README.md +14 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/node_modules/block-stream/bench/block-stream-pause.js +70 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/node_modules/block-stream/bench/block-stream.js +68 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/node_modules/block-stream/bench/dropper-pause.js +70 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/node_modules/block-stream/bench/dropper.js +68 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/node_modules/block-stream/block-stream.js +209 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/node_modules/block-stream/package.json +55 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/node_modules/block-stream/test/basic.js +27 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/node_modules/block-stream/test/nopad-thorough.js +68 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/node_modules/block-stream/test/nopad.js +57 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/node_modules/block-stream/test/pause-resume.js +73 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/node_modules/block-stream/test/thorough.js +68 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/node_modules/block-stream/test/two-stream.js +59 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/node_modules/inherits/LICENSE +16 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/node_modules/inherits/README.md +42 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/node_modules/inherits/inherits.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/node_modules/inherits/inherits_browser.js +23 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/node_modules/inherits/package.json +50 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/node_modules/inherits/test.js +25 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/package.json +54 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/tar.js +173 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/test/00-setup-fixtures.js +53 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/test/extract.js +367 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/test/fixtures.tgz +0 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/test/header.js +183 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/test/pack-no-proprietary.js +854 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/test/pack.js +897 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/test/parse.js +359 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/tar/test/zz-cleanup.js +20 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/uid-number/LICENCE +25 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/uid-number/README.md +17 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/uid-number/get-uid-gid.js +24 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/uid-number/package.json +50 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/uid-number/uid-number.js +54 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/package.json +58 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/test/fixtures/packed-file.txt +1 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/test/fixtures/packed.tar +0 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/test/fixtures/packed.tar.gz +0 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/test/fixtures/to-pack/bar.txt +1 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/test/fixtures/to-pack/foo.txt +1 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/test/index.js +67 -0
- package/node_modules/node-pre-gyp/package.json +114 -0
- package/package.json +14 -2
@@ -0,0 +1,4857 @@
|
|
1
|
+
/* @preserve
|
2
|
+
* The MIT License (MIT)
|
3
|
+
*
|
4
|
+
* Copyright (c) 2014 Petka Antonov
|
5
|
+
*
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
11
|
+
* furnished to do so, subject to the following conditions:
|
12
|
+
*
|
13
|
+
* The above copyright notice and this permission notice shall be included in
|
14
|
+
* all copies or substantial portions of the Software.
|
15
|
+
*
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
+
* THE SOFTWARE.
|
23
|
+
*
|
24
|
+
*/
|
25
|
+
/**
|
26
|
+
* bluebird build version 2.9.34
|
27
|
+
* Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, cancel, using, filter, any, each, timers
|
28
|
+
*/
|
29
|
+
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Promise=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof _dereq_=="function"&&_dereq_;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof _dereq_=="function"&&_dereq_;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
|
30
|
+
"use strict";
|
31
|
+
module.exports = function(Promise) {
|
32
|
+
var SomePromiseArray = Promise._SomePromiseArray;
|
33
|
+
function any(promises) {
|
34
|
+
var ret = new SomePromiseArray(promises);
|
35
|
+
var promise = ret.promise();
|
36
|
+
ret.setHowMany(1);
|
37
|
+
ret.setUnwrap();
|
38
|
+
ret.init();
|
39
|
+
return promise;
|
40
|
+
}
|
41
|
+
|
42
|
+
Promise.any = function (promises) {
|
43
|
+
return any(promises);
|
44
|
+
};
|
45
|
+
|
46
|
+
Promise.prototype.any = function () {
|
47
|
+
return any(this);
|
48
|
+
};
|
49
|
+
|
50
|
+
};
|
51
|
+
|
52
|
+
},{}],2:[function(_dereq_,module,exports){
|
53
|
+
"use strict";
|
54
|
+
var firstLineError;
|
55
|
+
try {throw new Error(); } catch (e) {firstLineError = e;}
|
56
|
+
var schedule = _dereq_("./schedule.js");
|
57
|
+
var Queue = _dereq_("./queue.js");
|
58
|
+
var util = _dereq_("./util.js");
|
59
|
+
|
60
|
+
function Async() {
|
61
|
+
this._isTickUsed = false;
|
62
|
+
this._lateQueue = new Queue(16);
|
63
|
+
this._normalQueue = new Queue(16);
|
64
|
+
this._trampolineEnabled = true;
|
65
|
+
var self = this;
|
66
|
+
this.drainQueues = function () {
|
67
|
+
self._drainQueues();
|
68
|
+
};
|
69
|
+
this._schedule =
|
70
|
+
schedule.isStatic ? schedule(this.drainQueues) : schedule;
|
71
|
+
}
|
72
|
+
|
73
|
+
Async.prototype.disableTrampolineIfNecessary = function() {
|
74
|
+
if (util.hasDevTools) {
|
75
|
+
this._trampolineEnabled = false;
|
76
|
+
}
|
77
|
+
};
|
78
|
+
|
79
|
+
Async.prototype.enableTrampoline = function() {
|
80
|
+
if (!this._trampolineEnabled) {
|
81
|
+
this._trampolineEnabled = true;
|
82
|
+
this._schedule = function(fn) {
|
83
|
+
setTimeout(fn, 0);
|
84
|
+
};
|
85
|
+
}
|
86
|
+
};
|
87
|
+
|
88
|
+
Async.prototype.haveItemsQueued = function () {
|
89
|
+
return this._normalQueue.length() > 0;
|
90
|
+
};
|
91
|
+
|
92
|
+
Async.prototype.throwLater = function(fn, arg) {
|
93
|
+
if (arguments.length === 1) {
|
94
|
+
arg = fn;
|
95
|
+
fn = function () { throw arg; };
|
96
|
+
}
|
97
|
+
if (typeof setTimeout !== "undefined") {
|
98
|
+
setTimeout(function() {
|
99
|
+
fn(arg);
|
100
|
+
}, 0);
|
101
|
+
} else try {
|
102
|
+
this._schedule(function() {
|
103
|
+
fn(arg);
|
104
|
+
});
|
105
|
+
} catch (e) {
|
106
|
+
throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/m3OTXk\u000a");
|
107
|
+
}
|
108
|
+
};
|
109
|
+
|
110
|
+
function AsyncInvokeLater(fn, receiver, arg) {
|
111
|
+
this._lateQueue.push(fn, receiver, arg);
|
112
|
+
this._queueTick();
|
113
|
+
}
|
114
|
+
|
115
|
+
function AsyncInvoke(fn, receiver, arg) {
|
116
|
+
this._normalQueue.push(fn, receiver, arg);
|
117
|
+
this._queueTick();
|
118
|
+
}
|
119
|
+
|
120
|
+
function AsyncSettlePromises(promise) {
|
121
|
+
this._normalQueue._pushOne(promise);
|
122
|
+
this._queueTick();
|
123
|
+
}
|
124
|
+
|
125
|
+
if (!util.hasDevTools) {
|
126
|
+
Async.prototype.invokeLater = AsyncInvokeLater;
|
127
|
+
Async.prototype.invoke = AsyncInvoke;
|
128
|
+
Async.prototype.settlePromises = AsyncSettlePromises;
|
129
|
+
} else {
|
130
|
+
if (schedule.isStatic) {
|
131
|
+
schedule = function(fn) { setTimeout(fn, 0); };
|
132
|
+
}
|
133
|
+
Async.prototype.invokeLater = function (fn, receiver, arg) {
|
134
|
+
if (this._trampolineEnabled) {
|
135
|
+
AsyncInvokeLater.call(this, fn, receiver, arg);
|
136
|
+
} else {
|
137
|
+
this._schedule(function() {
|
138
|
+
setTimeout(function() {
|
139
|
+
fn.call(receiver, arg);
|
140
|
+
}, 100);
|
141
|
+
});
|
142
|
+
}
|
143
|
+
};
|
144
|
+
|
145
|
+
Async.prototype.invoke = function (fn, receiver, arg) {
|
146
|
+
if (this._trampolineEnabled) {
|
147
|
+
AsyncInvoke.call(this, fn, receiver, arg);
|
148
|
+
} else {
|
149
|
+
this._schedule(function() {
|
150
|
+
fn.call(receiver, arg);
|
151
|
+
});
|
152
|
+
}
|
153
|
+
};
|
154
|
+
|
155
|
+
Async.prototype.settlePromises = function(promise) {
|
156
|
+
if (this._trampolineEnabled) {
|
157
|
+
AsyncSettlePromises.call(this, promise);
|
158
|
+
} else {
|
159
|
+
this._schedule(function() {
|
160
|
+
promise._settlePromises();
|
161
|
+
});
|
162
|
+
}
|
163
|
+
};
|
164
|
+
}
|
165
|
+
|
166
|
+
Async.prototype.invokeFirst = function (fn, receiver, arg) {
|
167
|
+
this._normalQueue.unshift(fn, receiver, arg);
|
168
|
+
this._queueTick();
|
169
|
+
};
|
170
|
+
|
171
|
+
Async.prototype._drainQueue = function(queue) {
|
172
|
+
while (queue.length() > 0) {
|
173
|
+
var fn = queue.shift();
|
174
|
+
if (typeof fn !== "function") {
|
175
|
+
fn._settlePromises();
|
176
|
+
continue;
|
177
|
+
}
|
178
|
+
var receiver = queue.shift();
|
179
|
+
var arg = queue.shift();
|
180
|
+
fn.call(receiver, arg);
|
181
|
+
}
|
182
|
+
};
|
183
|
+
|
184
|
+
Async.prototype._drainQueues = function () {
|
185
|
+
this._drainQueue(this._normalQueue);
|
186
|
+
this._reset();
|
187
|
+
this._drainQueue(this._lateQueue);
|
188
|
+
};
|
189
|
+
|
190
|
+
Async.prototype._queueTick = function () {
|
191
|
+
if (!this._isTickUsed) {
|
192
|
+
this._isTickUsed = true;
|
193
|
+
this._schedule(this.drainQueues);
|
194
|
+
}
|
195
|
+
};
|
196
|
+
|
197
|
+
Async.prototype._reset = function () {
|
198
|
+
this._isTickUsed = false;
|
199
|
+
};
|
200
|
+
|
201
|
+
module.exports = new Async();
|
202
|
+
module.exports.firstLineError = firstLineError;
|
203
|
+
|
204
|
+
},{"./queue.js":28,"./schedule.js":31,"./util.js":38}],3:[function(_dereq_,module,exports){
|
205
|
+
"use strict";
|
206
|
+
module.exports = function(Promise, INTERNAL, tryConvertToPromise) {
|
207
|
+
var rejectThis = function(_, e) {
|
208
|
+
this._reject(e);
|
209
|
+
};
|
210
|
+
|
211
|
+
var targetRejected = function(e, context) {
|
212
|
+
context.promiseRejectionQueued = true;
|
213
|
+
context.bindingPromise._then(rejectThis, rejectThis, null, this, e);
|
214
|
+
};
|
215
|
+
|
216
|
+
var bindingResolved = function(thisArg, context) {
|
217
|
+
if (this._isPending()) {
|
218
|
+
this._resolveCallback(context.target);
|
219
|
+
}
|
220
|
+
};
|
221
|
+
|
222
|
+
var bindingRejected = function(e, context) {
|
223
|
+
if (!context.promiseRejectionQueued) this._reject(e);
|
224
|
+
};
|
225
|
+
|
226
|
+
Promise.prototype.bind = function (thisArg) {
|
227
|
+
var maybePromise = tryConvertToPromise(thisArg);
|
228
|
+
var ret = new Promise(INTERNAL);
|
229
|
+
ret._propagateFrom(this, 1);
|
230
|
+
var target = this._target();
|
231
|
+
|
232
|
+
ret._setBoundTo(maybePromise);
|
233
|
+
if (maybePromise instanceof Promise) {
|
234
|
+
var context = {
|
235
|
+
promiseRejectionQueued: false,
|
236
|
+
promise: ret,
|
237
|
+
target: target,
|
238
|
+
bindingPromise: maybePromise
|
239
|
+
};
|
240
|
+
target._then(INTERNAL, targetRejected, ret._progress, ret, context);
|
241
|
+
maybePromise._then(
|
242
|
+
bindingResolved, bindingRejected, ret._progress, ret, context);
|
243
|
+
} else {
|
244
|
+
ret._resolveCallback(target);
|
245
|
+
}
|
246
|
+
return ret;
|
247
|
+
};
|
248
|
+
|
249
|
+
Promise.prototype._setBoundTo = function (obj) {
|
250
|
+
if (obj !== undefined) {
|
251
|
+
this._bitField = this._bitField | 131072;
|
252
|
+
this._boundTo = obj;
|
253
|
+
} else {
|
254
|
+
this._bitField = this._bitField & (~131072);
|
255
|
+
}
|
256
|
+
};
|
257
|
+
|
258
|
+
Promise.prototype._isBound = function () {
|
259
|
+
return (this._bitField & 131072) === 131072;
|
260
|
+
};
|
261
|
+
|
262
|
+
Promise.bind = function (thisArg, value) {
|
263
|
+
var maybePromise = tryConvertToPromise(thisArg);
|
264
|
+
var ret = new Promise(INTERNAL);
|
265
|
+
|
266
|
+
ret._setBoundTo(maybePromise);
|
267
|
+
if (maybePromise instanceof Promise) {
|
268
|
+
maybePromise._then(function() {
|
269
|
+
ret._resolveCallback(value);
|
270
|
+
}, ret._reject, ret._progress, ret, null);
|
271
|
+
} else {
|
272
|
+
ret._resolveCallback(value);
|
273
|
+
}
|
274
|
+
return ret;
|
275
|
+
};
|
276
|
+
};
|
277
|
+
|
278
|
+
},{}],4:[function(_dereq_,module,exports){
|
279
|
+
"use strict";
|
280
|
+
var old;
|
281
|
+
if (typeof Promise !== "undefined") old = Promise;
|
282
|
+
function noConflict() {
|
283
|
+
try { if (Promise === bluebird) Promise = old; }
|
284
|
+
catch (e) {}
|
285
|
+
return bluebird;
|
286
|
+
}
|
287
|
+
var bluebird = _dereq_("./promise.js")();
|
288
|
+
bluebird.noConflict = noConflict;
|
289
|
+
module.exports = bluebird;
|
290
|
+
|
291
|
+
},{"./promise.js":23}],5:[function(_dereq_,module,exports){
|
292
|
+
"use strict";
|
293
|
+
var cr = Object.create;
|
294
|
+
if (cr) {
|
295
|
+
var callerCache = cr(null);
|
296
|
+
var getterCache = cr(null);
|
297
|
+
callerCache[" size"] = getterCache[" size"] = 0;
|
298
|
+
}
|
299
|
+
|
300
|
+
module.exports = function(Promise) {
|
301
|
+
var util = _dereq_("./util.js");
|
302
|
+
var canEvaluate = util.canEvaluate;
|
303
|
+
var isIdentifier = util.isIdentifier;
|
304
|
+
|
305
|
+
var getMethodCaller;
|
306
|
+
var getGetter;
|
307
|
+
if (!true) {
|
308
|
+
var makeMethodCaller = function (methodName) {
|
309
|
+
return new Function("ensureMethod", " \n\
|
310
|
+
return function(obj) { \n\
|
311
|
+
'use strict' \n\
|
312
|
+
var len = this.length; \n\
|
313
|
+
ensureMethod(obj, 'methodName'); \n\
|
314
|
+
switch(len) { \n\
|
315
|
+
case 1: return obj.methodName(this[0]); \n\
|
316
|
+
case 2: return obj.methodName(this[0], this[1]); \n\
|
317
|
+
case 3: return obj.methodName(this[0], this[1], this[2]); \n\
|
318
|
+
case 0: return obj.methodName(); \n\
|
319
|
+
default: \n\
|
320
|
+
return obj.methodName.apply(obj, this); \n\
|
321
|
+
} \n\
|
322
|
+
}; \n\
|
323
|
+
".replace(/methodName/g, methodName))(ensureMethod);
|
324
|
+
};
|
325
|
+
|
326
|
+
var makeGetter = function (propertyName) {
|
327
|
+
return new Function("obj", " \n\
|
328
|
+
'use strict'; \n\
|
329
|
+
return obj.propertyName; \n\
|
330
|
+
".replace("propertyName", propertyName));
|
331
|
+
};
|
332
|
+
|
333
|
+
var getCompiled = function(name, compiler, cache) {
|
334
|
+
var ret = cache[name];
|
335
|
+
if (typeof ret !== "function") {
|
336
|
+
if (!isIdentifier(name)) {
|
337
|
+
return null;
|
338
|
+
}
|
339
|
+
ret = compiler(name);
|
340
|
+
cache[name] = ret;
|
341
|
+
cache[" size"]++;
|
342
|
+
if (cache[" size"] > 512) {
|
343
|
+
var keys = Object.keys(cache);
|
344
|
+
for (var i = 0; i < 256; ++i) delete cache[keys[i]];
|
345
|
+
cache[" size"] = keys.length - 256;
|
346
|
+
}
|
347
|
+
}
|
348
|
+
return ret;
|
349
|
+
};
|
350
|
+
|
351
|
+
getMethodCaller = function(name) {
|
352
|
+
return getCompiled(name, makeMethodCaller, callerCache);
|
353
|
+
};
|
354
|
+
|
355
|
+
getGetter = function(name) {
|
356
|
+
return getCompiled(name, makeGetter, getterCache);
|
357
|
+
};
|
358
|
+
}
|
359
|
+
|
360
|
+
function ensureMethod(obj, methodName) {
|
361
|
+
var fn;
|
362
|
+
if (obj != null) fn = obj[methodName];
|
363
|
+
if (typeof fn !== "function") {
|
364
|
+
var message = "Object " + util.classString(obj) + " has no method '" +
|
365
|
+
util.toString(methodName) + "'";
|
366
|
+
throw new Promise.TypeError(message);
|
367
|
+
}
|
368
|
+
return fn;
|
369
|
+
}
|
370
|
+
|
371
|
+
function caller(obj) {
|
372
|
+
var methodName = this.pop();
|
373
|
+
var fn = ensureMethod(obj, methodName);
|
374
|
+
return fn.apply(obj, this);
|
375
|
+
}
|
376
|
+
Promise.prototype.call = function (methodName) {
|
377
|
+
var $_len = arguments.length;var args = new Array($_len - 1); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];}
|
378
|
+
if (!true) {
|
379
|
+
if (canEvaluate) {
|
380
|
+
var maybeCaller = getMethodCaller(methodName);
|
381
|
+
if (maybeCaller !== null) {
|
382
|
+
return this._then(
|
383
|
+
maybeCaller, undefined, undefined, args, undefined);
|
384
|
+
}
|
385
|
+
}
|
386
|
+
}
|
387
|
+
args.push(methodName);
|
388
|
+
return this._then(caller, undefined, undefined, args, undefined);
|
389
|
+
};
|
390
|
+
|
391
|
+
function namedGetter(obj) {
|
392
|
+
return obj[this];
|
393
|
+
}
|
394
|
+
function indexedGetter(obj) {
|
395
|
+
var index = +this;
|
396
|
+
if (index < 0) index = Math.max(0, index + obj.length);
|
397
|
+
return obj[index];
|
398
|
+
}
|
399
|
+
Promise.prototype.get = function (propertyName) {
|
400
|
+
var isIndex = (typeof propertyName === "number");
|
401
|
+
var getter;
|
402
|
+
if (!isIndex) {
|
403
|
+
if (canEvaluate) {
|
404
|
+
var maybeGetter = getGetter(propertyName);
|
405
|
+
getter = maybeGetter !== null ? maybeGetter : namedGetter;
|
406
|
+
} else {
|
407
|
+
getter = namedGetter;
|
408
|
+
}
|
409
|
+
} else {
|
410
|
+
getter = indexedGetter;
|
411
|
+
}
|
412
|
+
return this._then(getter, undefined, undefined, propertyName, undefined);
|
413
|
+
};
|
414
|
+
};
|
415
|
+
|
416
|
+
},{"./util.js":38}],6:[function(_dereq_,module,exports){
|
417
|
+
"use strict";
|
418
|
+
module.exports = function(Promise) {
|
419
|
+
var errors = _dereq_("./errors.js");
|
420
|
+
var async = _dereq_("./async.js");
|
421
|
+
var CancellationError = errors.CancellationError;
|
422
|
+
|
423
|
+
Promise.prototype._cancel = function (reason) {
|
424
|
+
if (!this.isCancellable()) return this;
|
425
|
+
var parent;
|
426
|
+
var promiseToReject = this;
|
427
|
+
while ((parent = promiseToReject._cancellationParent) !== undefined &&
|
428
|
+
parent.isCancellable()) {
|
429
|
+
promiseToReject = parent;
|
430
|
+
}
|
431
|
+
this._unsetCancellable();
|
432
|
+
promiseToReject._target()._rejectCallback(reason, false, true);
|
433
|
+
};
|
434
|
+
|
435
|
+
Promise.prototype.cancel = function (reason) {
|
436
|
+
if (!this.isCancellable()) return this;
|
437
|
+
if (reason === undefined) reason = new CancellationError();
|
438
|
+
async.invokeLater(this._cancel, this, reason);
|
439
|
+
return this;
|
440
|
+
};
|
441
|
+
|
442
|
+
Promise.prototype.cancellable = function () {
|
443
|
+
if (this._cancellable()) return this;
|
444
|
+
async.enableTrampoline();
|
445
|
+
this._setCancellable();
|
446
|
+
this._cancellationParent = undefined;
|
447
|
+
return this;
|
448
|
+
};
|
449
|
+
|
450
|
+
Promise.prototype.uncancellable = function () {
|
451
|
+
var ret = this.then();
|
452
|
+
ret._unsetCancellable();
|
453
|
+
return ret;
|
454
|
+
};
|
455
|
+
|
456
|
+
Promise.prototype.fork = function (didFulfill, didReject, didProgress) {
|
457
|
+
var ret = this._then(didFulfill, didReject, didProgress,
|
458
|
+
undefined, undefined);
|
459
|
+
|
460
|
+
ret._setCancellable();
|
461
|
+
ret._cancellationParent = undefined;
|
462
|
+
return ret;
|
463
|
+
};
|
464
|
+
};
|
465
|
+
|
466
|
+
},{"./async.js":2,"./errors.js":13}],7:[function(_dereq_,module,exports){
|
467
|
+
"use strict";
|
468
|
+
module.exports = function() {
|
469
|
+
var async = _dereq_("./async.js");
|
470
|
+
var util = _dereq_("./util.js");
|
471
|
+
var bluebirdFramePattern =
|
472
|
+
/[\\\/]bluebird[\\\/]js[\\\/](main|debug|zalgo|instrumented)/;
|
473
|
+
var stackFramePattern = null;
|
474
|
+
var formatStack = null;
|
475
|
+
var indentStackFrames = false;
|
476
|
+
var warn;
|
477
|
+
|
478
|
+
function CapturedTrace(parent) {
|
479
|
+
this._parent = parent;
|
480
|
+
var length = this._length = 1 + (parent === undefined ? 0 : parent._length);
|
481
|
+
captureStackTrace(this, CapturedTrace);
|
482
|
+
if (length > 32) this.uncycle();
|
483
|
+
}
|
484
|
+
util.inherits(CapturedTrace, Error);
|
485
|
+
|
486
|
+
CapturedTrace.prototype.uncycle = function() {
|
487
|
+
var length = this._length;
|
488
|
+
if (length < 2) return;
|
489
|
+
var nodes = [];
|
490
|
+
var stackToIndex = {};
|
491
|
+
|
492
|
+
for (var i = 0, node = this; node !== undefined; ++i) {
|
493
|
+
nodes.push(node);
|
494
|
+
node = node._parent;
|
495
|
+
}
|
496
|
+
length = this._length = i;
|
497
|
+
for (var i = length - 1; i >= 0; --i) {
|
498
|
+
var stack = nodes[i].stack;
|
499
|
+
if (stackToIndex[stack] === undefined) {
|
500
|
+
stackToIndex[stack] = i;
|
501
|
+
}
|
502
|
+
}
|
503
|
+
for (var i = 0; i < length; ++i) {
|
504
|
+
var currentStack = nodes[i].stack;
|
505
|
+
var index = stackToIndex[currentStack];
|
506
|
+
if (index !== undefined && index !== i) {
|
507
|
+
if (index > 0) {
|
508
|
+
nodes[index - 1]._parent = undefined;
|
509
|
+
nodes[index - 1]._length = 1;
|
510
|
+
}
|
511
|
+
nodes[i]._parent = undefined;
|
512
|
+
nodes[i]._length = 1;
|
513
|
+
var cycleEdgeNode = i > 0 ? nodes[i - 1] : this;
|
514
|
+
|
515
|
+
if (index < length - 1) {
|
516
|
+
cycleEdgeNode._parent = nodes[index + 1];
|
517
|
+
cycleEdgeNode._parent.uncycle();
|
518
|
+
cycleEdgeNode._length =
|
519
|
+
cycleEdgeNode._parent._length + 1;
|
520
|
+
} else {
|
521
|
+
cycleEdgeNode._parent = undefined;
|
522
|
+
cycleEdgeNode._length = 1;
|
523
|
+
}
|
524
|
+
var currentChildLength = cycleEdgeNode._length + 1;
|
525
|
+
for (var j = i - 2; j >= 0; --j) {
|
526
|
+
nodes[j]._length = currentChildLength;
|
527
|
+
currentChildLength++;
|
528
|
+
}
|
529
|
+
return;
|
530
|
+
}
|
531
|
+
}
|
532
|
+
};
|
533
|
+
|
534
|
+
CapturedTrace.prototype.parent = function() {
|
535
|
+
return this._parent;
|
536
|
+
};
|
537
|
+
|
538
|
+
CapturedTrace.prototype.hasParent = function() {
|
539
|
+
return this._parent !== undefined;
|
540
|
+
};
|
541
|
+
|
542
|
+
CapturedTrace.prototype.attachExtraTrace = function(error) {
|
543
|
+
if (error.__stackCleaned__) return;
|
544
|
+
this.uncycle();
|
545
|
+
var parsed = CapturedTrace.parseStackAndMessage(error);
|
546
|
+
var message = parsed.message;
|
547
|
+
var stacks = [parsed.stack];
|
548
|
+
|
549
|
+
var trace = this;
|
550
|
+
while (trace !== undefined) {
|
551
|
+
stacks.push(cleanStack(trace.stack.split("\n")));
|
552
|
+
trace = trace._parent;
|
553
|
+
}
|
554
|
+
removeCommonRoots(stacks);
|
555
|
+
removeDuplicateOrEmptyJumps(stacks);
|
556
|
+
util.notEnumerableProp(error, "stack", reconstructStack(message, stacks));
|
557
|
+
util.notEnumerableProp(error, "__stackCleaned__", true);
|
558
|
+
};
|
559
|
+
|
560
|
+
function reconstructStack(message, stacks) {
|
561
|
+
for (var i = 0; i < stacks.length - 1; ++i) {
|
562
|
+
stacks[i].push("From previous event:");
|
563
|
+
stacks[i] = stacks[i].join("\n");
|
564
|
+
}
|
565
|
+
if (i < stacks.length) {
|
566
|
+
stacks[i] = stacks[i].join("\n");
|
567
|
+
}
|
568
|
+
return message + "\n" + stacks.join("\n");
|
569
|
+
}
|
570
|
+
|
571
|
+
function removeDuplicateOrEmptyJumps(stacks) {
|
572
|
+
for (var i = 0; i < stacks.length; ++i) {
|
573
|
+
if (stacks[i].length === 0 ||
|
574
|
+
((i + 1 < stacks.length) && stacks[i][0] === stacks[i+1][0])) {
|
575
|
+
stacks.splice(i, 1);
|
576
|
+
i--;
|
577
|
+
}
|
578
|
+
}
|
579
|
+
}
|
580
|
+
|
581
|
+
function removeCommonRoots(stacks) {
|
582
|
+
var current = stacks[0];
|
583
|
+
for (var i = 1; i < stacks.length; ++i) {
|
584
|
+
var prev = stacks[i];
|
585
|
+
var currentLastIndex = current.length - 1;
|
586
|
+
var currentLastLine = current[currentLastIndex];
|
587
|
+
var commonRootMeetPoint = -1;
|
588
|
+
|
589
|
+
for (var j = prev.length - 1; j >= 0; --j) {
|
590
|
+
if (prev[j] === currentLastLine) {
|
591
|
+
commonRootMeetPoint = j;
|
592
|
+
break;
|
593
|
+
}
|
594
|
+
}
|
595
|
+
|
596
|
+
for (var j = commonRootMeetPoint; j >= 0; --j) {
|
597
|
+
var line = prev[j];
|
598
|
+
if (current[currentLastIndex] === line) {
|
599
|
+
current.pop();
|
600
|
+
currentLastIndex--;
|
601
|
+
} else {
|
602
|
+
break;
|
603
|
+
}
|
604
|
+
}
|
605
|
+
current = prev;
|
606
|
+
}
|
607
|
+
}
|
608
|
+
|
609
|
+
function cleanStack(stack) {
|
610
|
+
var ret = [];
|
611
|
+
for (var i = 0; i < stack.length; ++i) {
|
612
|
+
var line = stack[i];
|
613
|
+
var isTraceLine = stackFramePattern.test(line) ||
|
614
|
+
" (No stack trace)" === line;
|
615
|
+
var isInternalFrame = isTraceLine && shouldIgnore(line);
|
616
|
+
if (isTraceLine && !isInternalFrame) {
|
617
|
+
if (indentStackFrames && line.charAt(0) !== " ") {
|
618
|
+
line = " " + line;
|
619
|
+
}
|
620
|
+
ret.push(line);
|
621
|
+
}
|
622
|
+
}
|
623
|
+
return ret;
|
624
|
+
}
|
625
|
+
|
626
|
+
function stackFramesAsArray(error) {
|
627
|
+
var stack = error.stack.replace(/\s+$/g, "").split("\n");
|
628
|
+
for (var i = 0; i < stack.length; ++i) {
|
629
|
+
var line = stack[i];
|
630
|
+
if (" (No stack trace)" === line || stackFramePattern.test(line)) {
|
631
|
+
break;
|
632
|
+
}
|
633
|
+
}
|
634
|
+
if (i > 0) {
|
635
|
+
stack = stack.slice(i);
|
636
|
+
}
|
637
|
+
return stack;
|
638
|
+
}
|
639
|
+
|
640
|
+
CapturedTrace.parseStackAndMessage = function(error) {
|
641
|
+
var stack = error.stack;
|
642
|
+
var message = error.toString();
|
643
|
+
stack = typeof stack === "string" && stack.length > 0
|
644
|
+
? stackFramesAsArray(error) : [" (No stack trace)"];
|
645
|
+
return {
|
646
|
+
message: message,
|
647
|
+
stack: cleanStack(stack)
|
648
|
+
};
|
649
|
+
};
|
650
|
+
|
651
|
+
CapturedTrace.formatAndLogError = function(error, title) {
|
652
|
+
if (typeof console !== "undefined") {
|
653
|
+
var message;
|
654
|
+
if (typeof error === "object" || typeof error === "function") {
|
655
|
+
var stack = error.stack;
|
656
|
+
message = title + formatStack(stack, error);
|
657
|
+
} else {
|
658
|
+
message = title + String(error);
|
659
|
+
}
|
660
|
+
if (typeof warn === "function") {
|
661
|
+
warn(message);
|
662
|
+
} else if (typeof console.log === "function" ||
|
663
|
+
typeof console.log === "object") {
|
664
|
+
console.log(message);
|
665
|
+
}
|
666
|
+
}
|
667
|
+
};
|
668
|
+
|
669
|
+
CapturedTrace.unhandledRejection = function (reason) {
|
670
|
+
CapturedTrace.formatAndLogError(reason, "^--- With additional stack trace: ");
|
671
|
+
};
|
672
|
+
|
673
|
+
CapturedTrace.isSupported = function () {
|
674
|
+
return typeof captureStackTrace === "function";
|
675
|
+
};
|
676
|
+
|
677
|
+
CapturedTrace.fireRejectionEvent =
|
678
|
+
function(name, localHandler, reason, promise) {
|
679
|
+
var localEventFired = false;
|
680
|
+
try {
|
681
|
+
if (typeof localHandler === "function") {
|
682
|
+
localEventFired = true;
|
683
|
+
if (name === "rejectionHandled") {
|
684
|
+
localHandler(promise);
|
685
|
+
} else {
|
686
|
+
localHandler(reason, promise);
|
687
|
+
}
|
688
|
+
}
|
689
|
+
} catch (e) {
|
690
|
+
async.throwLater(e);
|
691
|
+
}
|
692
|
+
|
693
|
+
var globalEventFired = false;
|
694
|
+
try {
|
695
|
+
globalEventFired = fireGlobalEvent(name, reason, promise);
|
696
|
+
} catch (e) {
|
697
|
+
globalEventFired = true;
|
698
|
+
async.throwLater(e);
|
699
|
+
}
|
700
|
+
|
701
|
+
var domEventFired = false;
|
702
|
+
if (fireDomEvent) {
|
703
|
+
try {
|
704
|
+
domEventFired = fireDomEvent(name.toLowerCase(), {
|
705
|
+
reason: reason,
|
706
|
+
promise: promise
|
707
|
+
});
|
708
|
+
} catch (e) {
|
709
|
+
domEventFired = true;
|
710
|
+
async.throwLater(e);
|
711
|
+
}
|
712
|
+
}
|
713
|
+
|
714
|
+
if (!globalEventFired && !localEventFired && !domEventFired &&
|
715
|
+
name === "unhandledRejection") {
|
716
|
+
CapturedTrace.formatAndLogError(reason, "Unhandled rejection ");
|
717
|
+
}
|
718
|
+
};
|
719
|
+
|
720
|
+
function formatNonError(obj) {
|
721
|
+
var str;
|
722
|
+
if (typeof obj === "function") {
|
723
|
+
str = "[function " +
|
724
|
+
(obj.name || "anonymous") +
|
725
|
+
"]";
|
726
|
+
} else {
|
727
|
+
str = obj.toString();
|
728
|
+
var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/;
|
729
|
+
if (ruselessToString.test(str)) {
|
730
|
+
try {
|
731
|
+
var newStr = JSON.stringify(obj);
|
732
|
+
str = newStr;
|
733
|
+
}
|
734
|
+
catch(e) {
|
735
|
+
|
736
|
+
}
|
737
|
+
}
|
738
|
+
if (str.length === 0) {
|
739
|
+
str = "(empty array)";
|
740
|
+
}
|
741
|
+
}
|
742
|
+
return ("(<" + snip(str) + ">, no stack trace)");
|
743
|
+
}
|
744
|
+
|
745
|
+
function snip(str) {
|
746
|
+
var maxChars = 41;
|
747
|
+
if (str.length < maxChars) {
|
748
|
+
return str;
|
749
|
+
}
|
750
|
+
return str.substr(0, maxChars - 3) + "...";
|
751
|
+
}
|
752
|
+
|
753
|
+
var shouldIgnore = function() { return false; };
|
754
|
+
var parseLineInfoRegex = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;
|
755
|
+
function parseLineInfo(line) {
|
756
|
+
var matches = line.match(parseLineInfoRegex);
|
757
|
+
if (matches) {
|
758
|
+
return {
|
759
|
+
fileName: matches[1],
|
760
|
+
line: parseInt(matches[2], 10)
|
761
|
+
};
|
762
|
+
}
|
763
|
+
}
|
764
|
+
CapturedTrace.setBounds = function(firstLineError, lastLineError) {
|
765
|
+
if (!CapturedTrace.isSupported()) return;
|
766
|
+
var firstStackLines = firstLineError.stack.split("\n");
|
767
|
+
var lastStackLines = lastLineError.stack.split("\n");
|
768
|
+
var firstIndex = -1;
|
769
|
+
var lastIndex = -1;
|
770
|
+
var firstFileName;
|
771
|
+
var lastFileName;
|
772
|
+
for (var i = 0; i < firstStackLines.length; ++i) {
|
773
|
+
var result = parseLineInfo(firstStackLines[i]);
|
774
|
+
if (result) {
|
775
|
+
firstFileName = result.fileName;
|
776
|
+
firstIndex = result.line;
|
777
|
+
break;
|
778
|
+
}
|
779
|
+
}
|
780
|
+
for (var i = 0; i < lastStackLines.length; ++i) {
|
781
|
+
var result = parseLineInfo(lastStackLines[i]);
|
782
|
+
if (result) {
|
783
|
+
lastFileName = result.fileName;
|
784
|
+
lastIndex = result.line;
|
785
|
+
break;
|
786
|
+
}
|
787
|
+
}
|
788
|
+
if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName ||
|
789
|
+
firstFileName !== lastFileName || firstIndex >= lastIndex) {
|
790
|
+
return;
|
791
|
+
}
|
792
|
+
|
793
|
+
shouldIgnore = function(line) {
|
794
|
+
if (bluebirdFramePattern.test(line)) return true;
|
795
|
+
var info = parseLineInfo(line);
|
796
|
+
if (info) {
|
797
|
+
if (info.fileName === firstFileName &&
|
798
|
+
(firstIndex <= info.line && info.line <= lastIndex)) {
|
799
|
+
return true;
|
800
|
+
}
|
801
|
+
}
|
802
|
+
return false;
|
803
|
+
};
|
804
|
+
};
|
805
|
+
|
806
|
+
var captureStackTrace = (function stackDetection() {
|
807
|
+
var v8stackFramePattern = /^\s*at\s*/;
|
808
|
+
var v8stackFormatter = function(stack, error) {
|
809
|
+
if (typeof stack === "string") return stack;
|
810
|
+
|
811
|
+
if (error.name !== undefined &&
|
812
|
+
error.message !== undefined) {
|
813
|
+
return error.toString();
|
814
|
+
}
|
815
|
+
return formatNonError(error);
|
816
|
+
};
|
817
|
+
|
818
|
+
if (typeof Error.stackTraceLimit === "number" &&
|
819
|
+
typeof Error.captureStackTrace === "function") {
|
820
|
+
Error.stackTraceLimit = Error.stackTraceLimit + 6;
|
821
|
+
stackFramePattern = v8stackFramePattern;
|
822
|
+
formatStack = v8stackFormatter;
|
823
|
+
var captureStackTrace = Error.captureStackTrace;
|
824
|
+
|
825
|
+
shouldIgnore = function(line) {
|
826
|
+
return bluebirdFramePattern.test(line);
|
827
|
+
};
|
828
|
+
return function(receiver, ignoreUntil) {
|
829
|
+
Error.stackTraceLimit = Error.stackTraceLimit + 6;
|
830
|
+
captureStackTrace(receiver, ignoreUntil);
|
831
|
+
Error.stackTraceLimit = Error.stackTraceLimit - 6;
|
832
|
+
};
|
833
|
+
}
|
834
|
+
var err = new Error();
|
835
|
+
|
836
|
+
if (typeof err.stack === "string" &&
|
837
|
+
err.stack.split("\n")[0].indexOf("stackDetection@") >= 0) {
|
838
|
+
stackFramePattern = /@/;
|
839
|
+
formatStack = v8stackFormatter;
|
840
|
+
indentStackFrames = true;
|
841
|
+
return function captureStackTrace(o) {
|
842
|
+
o.stack = new Error().stack;
|
843
|
+
};
|
844
|
+
}
|
845
|
+
|
846
|
+
var hasStackAfterThrow;
|
847
|
+
try { throw new Error(); }
|
848
|
+
catch(e) {
|
849
|
+
hasStackAfterThrow = ("stack" in e);
|
850
|
+
}
|
851
|
+
if (!("stack" in err) && hasStackAfterThrow &&
|
852
|
+
typeof Error.stackTraceLimit === "number") {
|
853
|
+
stackFramePattern = v8stackFramePattern;
|
854
|
+
formatStack = v8stackFormatter;
|
855
|
+
return function captureStackTrace(o) {
|
856
|
+
Error.stackTraceLimit = Error.stackTraceLimit + 6;
|
857
|
+
try { throw new Error(); }
|
858
|
+
catch(e) { o.stack = e.stack; }
|
859
|
+
Error.stackTraceLimit = Error.stackTraceLimit - 6;
|
860
|
+
};
|
861
|
+
}
|
862
|
+
|
863
|
+
formatStack = function(stack, error) {
|
864
|
+
if (typeof stack === "string") return stack;
|
865
|
+
|
866
|
+
if ((typeof error === "object" ||
|
867
|
+
typeof error === "function") &&
|
868
|
+
error.name !== undefined &&
|
869
|
+
error.message !== undefined) {
|
870
|
+
return error.toString();
|
871
|
+
}
|
872
|
+
return formatNonError(error);
|
873
|
+
};
|
874
|
+
|
875
|
+
return null;
|
876
|
+
|
877
|
+
})([]);
|
878
|
+
|
879
|
+
var fireDomEvent;
|
880
|
+
var fireGlobalEvent = (function() {
|
881
|
+
if (util.isNode) {
|
882
|
+
return function(name, reason, promise) {
|
883
|
+
if (name === "rejectionHandled") {
|
884
|
+
return process.emit(name, promise);
|
885
|
+
} else {
|
886
|
+
return process.emit(name, reason, promise);
|
887
|
+
}
|
888
|
+
};
|
889
|
+
} else {
|
890
|
+
var customEventWorks = false;
|
891
|
+
var anyEventWorks = true;
|
892
|
+
try {
|
893
|
+
var ev = new self.CustomEvent("test");
|
894
|
+
customEventWorks = ev instanceof CustomEvent;
|
895
|
+
} catch (e) {}
|
896
|
+
if (!customEventWorks) {
|
897
|
+
try {
|
898
|
+
var event = document.createEvent("CustomEvent");
|
899
|
+
event.initCustomEvent("testingtheevent", false, true, {});
|
900
|
+
self.dispatchEvent(event);
|
901
|
+
} catch (e) {
|
902
|
+
anyEventWorks = false;
|
903
|
+
}
|
904
|
+
}
|
905
|
+
if (anyEventWorks) {
|
906
|
+
fireDomEvent = function(type, detail) {
|
907
|
+
var event;
|
908
|
+
if (customEventWorks) {
|
909
|
+
event = new self.CustomEvent(type, {
|
910
|
+
detail: detail,
|
911
|
+
bubbles: false,
|
912
|
+
cancelable: true
|
913
|
+
});
|
914
|
+
} else if (self.dispatchEvent) {
|
915
|
+
event = document.createEvent("CustomEvent");
|
916
|
+
event.initCustomEvent(type, false, true, detail);
|
917
|
+
}
|
918
|
+
|
919
|
+
return event ? !self.dispatchEvent(event) : false;
|
920
|
+
};
|
921
|
+
}
|
922
|
+
|
923
|
+
var toWindowMethodNameMap = {};
|
924
|
+
toWindowMethodNameMap["unhandledRejection"] = ("on" +
|
925
|
+
"unhandledRejection").toLowerCase();
|
926
|
+
toWindowMethodNameMap["rejectionHandled"] = ("on" +
|
927
|
+
"rejectionHandled").toLowerCase();
|
928
|
+
|
929
|
+
return function(name, reason, promise) {
|
930
|
+
var methodName = toWindowMethodNameMap[name];
|
931
|
+
var method = self[methodName];
|
932
|
+
if (!method) return false;
|
933
|
+
if (name === "rejectionHandled") {
|
934
|
+
method.call(self, promise);
|
935
|
+
} else {
|
936
|
+
method.call(self, reason, promise);
|
937
|
+
}
|
938
|
+
return true;
|
939
|
+
};
|
940
|
+
}
|
941
|
+
})();
|
942
|
+
|
943
|
+
if (typeof console !== "undefined" && typeof console.warn !== "undefined") {
|
944
|
+
warn = function (message) {
|
945
|
+
console.warn(message);
|
946
|
+
};
|
947
|
+
if (util.isNode && process.stderr.isTTY) {
|
948
|
+
warn = function(message) {
|
949
|
+
process.stderr.write("\u001b[31m" + message + "\u001b[39m\n");
|
950
|
+
};
|
951
|
+
} else if (!util.isNode && typeof (new Error().stack) === "string") {
|
952
|
+
warn = function(message) {
|
953
|
+
console.warn("%c" + message, "color: red");
|
954
|
+
};
|
955
|
+
}
|
956
|
+
}
|
957
|
+
|
958
|
+
return CapturedTrace;
|
959
|
+
};
|
960
|
+
|
961
|
+
},{"./async.js":2,"./util.js":38}],8:[function(_dereq_,module,exports){
|
962
|
+
"use strict";
|
963
|
+
module.exports = function(NEXT_FILTER) {
|
964
|
+
var util = _dereq_("./util.js");
|
965
|
+
var errors = _dereq_("./errors.js");
|
966
|
+
var tryCatch = util.tryCatch;
|
967
|
+
var errorObj = util.errorObj;
|
968
|
+
var keys = _dereq_("./es5.js").keys;
|
969
|
+
var TypeError = errors.TypeError;
|
970
|
+
|
971
|
+
function CatchFilter(instances, callback, promise) {
|
972
|
+
this._instances = instances;
|
973
|
+
this._callback = callback;
|
974
|
+
this._promise = promise;
|
975
|
+
}
|
976
|
+
|
977
|
+
function safePredicate(predicate, e) {
|
978
|
+
var safeObject = {};
|
979
|
+
var retfilter = tryCatch(predicate).call(safeObject, e);
|
980
|
+
|
981
|
+
if (retfilter === errorObj) return retfilter;
|
982
|
+
|
983
|
+
var safeKeys = keys(safeObject);
|
984
|
+
if (safeKeys.length) {
|
985
|
+
errorObj.e = new TypeError("Catch filter must inherit from Error or be a simple predicate function\u000a\u000a See http://goo.gl/o84o68\u000a");
|
986
|
+
return errorObj;
|
987
|
+
}
|
988
|
+
return retfilter;
|
989
|
+
}
|
990
|
+
|
991
|
+
CatchFilter.prototype.doFilter = function (e) {
|
992
|
+
var cb = this._callback;
|
993
|
+
var promise = this._promise;
|
994
|
+
var boundTo = promise._boundValue();
|
995
|
+
for (var i = 0, len = this._instances.length; i < len; ++i) {
|
996
|
+
var item = this._instances[i];
|
997
|
+
var itemIsErrorType = item === Error ||
|
998
|
+
(item != null && item.prototype instanceof Error);
|
999
|
+
|
1000
|
+
if (itemIsErrorType && e instanceof item) {
|
1001
|
+
var ret = tryCatch(cb).call(boundTo, e);
|
1002
|
+
if (ret === errorObj) {
|
1003
|
+
NEXT_FILTER.e = ret.e;
|
1004
|
+
return NEXT_FILTER;
|
1005
|
+
}
|
1006
|
+
return ret;
|
1007
|
+
} else if (typeof item === "function" && !itemIsErrorType) {
|
1008
|
+
var shouldHandle = safePredicate(item, e);
|
1009
|
+
if (shouldHandle === errorObj) {
|
1010
|
+
e = errorObj.e;
|
1011
|
+
break;
|
1012
|
+
} else if (shouldHandle) {
|
1013
|
+
var ret = tryCatch(cb).call(boundTo, e);
|
1014
|
+
if (ret === errorObj) {
|
1015
|
+
NEXT_FILTER.e = ret.e;
|
1016
|
+
return NEXT_FILTER;
|
1017
|
+
}
|
1018
|
+
return ret;
|
1019
|
+
}
|
1020
|
+
}
|
1021
|
+
}
|
1022
|
+
NEXT_FILTER.e = e;
|
1023
|
+
return NEXT_FILTER;
|
1024
|
+
};
|
1025
|
+
|
1026
|
+
return CatchFilter;
|
1027
|
+
};
|
1028
|
+
|
1029
|
+
},{"./errors.js":13,"./es5.js":14,"./util.js":38}],9:[function(_dereq_,module,exports){
|
1030
|
+
"use strict";
|
1031
|
+
module.exports = function(Promise, CapturedTrace, isDebugging) {
|
1032
|
+
var contextStack = [];
|
1033
|
+
function Context() {
|
1034
|
+
this._trace = new CapturedTrace(peekContext());
|
1035
|
+
}
|
1036
|
+
Context.prototype._pushContext = function () {
|
1037
|
+
if (!isDebugging()) return;
|
1038
|
+
if (this._trace !== undefined) {
|
1039
|
+
contextStack.push(this._trace);
|
1040
|
+
}
|
1041
|
+
};
|
1042
|
+
|
1043
|
+
Context.prototype._popContext = function () {
|
1044
|
+
if (!isDebugging()) return;
|
1045
|
+
if (this._trace !== undefined) {
|
1046
|
+
contextStack.pop();
|
1047
|
+
}
|
1048
|
+
};
|
1049
|
+
|
1050
|
+
function createContext() {
|
1051
|
+
if (isDebugging()) return new Context();
|
1052
|
+
}
|
1053
|
+
|
1054
|
+
function peekContext() {
|
1055
|
+
var lastIndex = contextStack.length - 1;
|
1056
|
+
if (lastIndex >= 0) {
|
1057
|
+
return contextStack[lastIndex];
|
1058
|
+
}
|
1059
|
+
return undefined;
|
1060
|
+
}
|
1061
|
+
|
1062
|
+
Promise.prototype._peekContext = peekContext;
|
1063
|
+
Promise.prototype._pushContext = Context.prototype._pushContext;
|
1064
|
+
Promise.prototype._popContext = Context.prototype._popContext;
|
1065
|
+
|
1066
|
+
return createContext;
|
1067
|
+
};
|
1068
|
+
|
1069
|
+
},{}],10:[function(_dereq_,module,exports){
|
1070
|
+
"use strict";
|
1071
|
+
module.exports = function(Promise, CapturedTrace) {
|
1072
|
+
var getDomain = Promise._getDomain;
|
1073
|
+
var async = _dereq_("./async.js");
|
1074
|
+
var Warning = _dereq_("./errors.js").Warning;
|
1075
|
+
var util = _dereq_("./util.js");
|
1076
|
+
var canAttachTrace = util.canAttachTrace;
|
1077
|
+
var unhandledRejectionHandled;
|
1078
|
+
var possiblyUnhandledRejection;
|
1079
|
+
var debugging = false || (util.isNode &&
|
1080
|
+
(!!process.env["BLUEBIRD_DEBUG"] ||
|
1081
|
+
process.env["NODE_ENV"] === "development"));
|
1082
|
+
|
1083
|
+
if (debugging) {
|
1084
|
+
async.disableTrampolineIfNecessary();
|
1085
|
+
}
|
1086
|
+
|
1087
|
+
Promise.prototype._ignoreRejections = function() {
|
1088
|
+
this._unsetRejectionIsUnhandled();
|
1089
|
+
this._bitField = this._bitField | 16777216;
|
1090
|
+
};
|
1091
|
+
|
1092
|
+
Promise.prototype._ensurePossibleRejectionHandled = function () {
|
1093
|
+
if ((this._bitField & 16777216) !== 0) return;
|
1094
|
+
this._setRejectionIsUnhandled();
|
1095
|
+
async.invokeLater(this._notifyUnhandledRejection, this, undefined);
|
1096
|
+
};
|
1097
|
+
|
1098
|
+
Promise.prototype._notifyUnhandledRejectionIsHandled = function () {
|
1099
|
+
CapturedTrace.fireRejectionEvent("rejectionHandled",
|
1100
|
+
unhandledRejectionHandled, undefined, this);
|
1101
|
+
};
|
1102
|
+
|
1103
|
+
Promise.prototype._notifyUnhandledRejection = function () {
|
1104
|
+
if (this._isRejectionUnhandled()) {
|
1105
|
+
var reason = this._getCarriedStackTrace() || this._settledValue;
|
1106
|
+
this._setUnhandledRejectionIsNotified();
|
1107
|
+
CapturedTrace.fireRejectionEvent("unhandledRejection",
|
1108
|
+
possiblyUnhandledRejection, reason, this);
|
1109
|
+
}
|
1110
|
+
};
|
1111
|
+
|
1112
|
+
Promise.prototype._setUnhandledRejectionIsNotified = function () {
|
1113
|
+
this._bitField = this._bitField | 524288;
|
1114
|
+
};
|
1115
|
+
|
1116
|
+
Promise.prototype._unsetUnhandledRejectionIsNotified = function () {
|
1117
|
+
this._bitField = this._bitField & (~524288);
|
1118
|
+
};
|
1119
|
+
|
1120
|
+
Promise.prototype._isUnhandledRejectionNotified = function () {
|
1121
|
+
return (this._bitField & 524288) > 0;
|
1122
|
+
};
|
1123
|
+
|
1124
|
+
Promise.prototype._setRejectionIsUnhandled = function () {
|
1125
|
+
this._bitField = this._bitField | 2097152;
|
1126
|
+
};
|
1127
|
+
|
1128
|
+
Promise.prototype._unsetRejectionIsUnhandled = function () {
|
1129
|
+
this._bitField = this._bitField & (~2097152);
|
1130
|
+
if (this._isUnhandledRejectionNotified()) {
|
1131
|
+
this._unsetUnhandledRejectionIsNotified();
|
1132
|
+
this._notifyUnhandledRejectionIsHandled();
|
1133
|
+
}
|
1134
|
+
};
|
1135
|
+
|
1136
|
+
Promise.prototype._isRejectionUnhandled = function () {
|
1137
|
+
return (this._bitField & 2097152) > 0;
|
1138
|
+
};
|
1139
|
+
|
1140
|
+
Promise.prototype._setCarriedStackTrace = function (capturedTrace) {
|
1141
|
+
this._bitField = this._bitField | 1048576;
|
1142
|
+
this._fulfillmentHandler0 = capturedTrace;
|
1143
|
+
};
|
1144
|
+
|
1145
|
+
Promise.prototype._isCarryingStackTrace = function () {
|
1146
|
+
return (this._bitField & 1048576) > 0;
|
1147
|
+
};
|
1148
|
+
|
1149
|
+
Promise.prototype._getCarriedStackTrace = function () {
|
1150
|
+
return this._isCarryingStackTrace()
|
1151
|
+
? this._fulfillmentHandler0
|
1152
|
+
: undefined;
|
1153
|
+
};
|
1154
|
+
|
1155
|
+
Promise.prototype._captureStackTrace = function () {
|
1156
|
+
if (debugging) {
|
1157
|
+
this._trace = new CapturedTrace(this._peekContext());
|
1158
|
+
}
|
1159
|
+
return this;
|
1160
|
+
};
|
1161
|
+
|
1162
|
+
Promise.prototype._attachExtraTrace = function (error, ignoreSelf) {
|
1163
|
+
if (debugging && canAttachTrace(error)) {
|
1164
|
+
var trace = this._trace;
|
1165
|
+
if (trace !== undefined) {
|
1166
|
+
if (ignoreSelf) trace = trace._parent;
|
1167
|
+
}
|
1168
|
+
if (trace !== undefined) {
|
1169
|
+
trace.attachExtraTrace(error);
|
1170
|
+
} else if (!error.__stackCleaned__) {
|
1171
|
+
var parsed = CapturedTrace.parseStackAndMessage(error);
|
1172
|
+
util.notEnumerableProp(error, "stack",
|
1173
|
+
parsed.message + "\n" + parsed.stack.join("\n"));
|
1174
|
+
util.notEnumerableProp(error, "__stackCleaned__", true);
|
1175
|
+
}
|
1176
|
+
}
|
1177
|
+
};
|
1178
|
+
|
1179
|
+
Promise.prototype._warn = function(message) {
|
1180
|
+
var warning = new Warning(message);
|
1181
|
+
var ctx = this._peekContext();
|
1182
|
+
if (ctx) {
|
1183
|
+
ctx.attachExtraTrace(warning);
|
1184
|
+
} else {
|
1185
|
+
var parsed = CapturedTrace.parseStackAndMessage(warning);
|
1186
|
+
warning.stack = parsed.message + "\n" + parsed.stack.join("\n");
|
1187
|
+
}
|
1188
|
+
CapturedTrace.formatAndLogError(warning, "");
|
1189
|
+
};
|
1190
|
+
|
1191
|
+
Promise.onPossiblyUnhandledRejection = function (fn) {
|
1192
|
+
var domain = getDomain();
|
1193
|
+
possiblyUnhandledRejection =
|
1194
|
+
typeof fn === "function" ? (domain === null ? fn : domain.bind(fn))
|
1195
|
+
: undefined;
|
1196
|
+
};
|
1197
|
+
|
1198
|
+
Promise.onUnhandledRejectionHandled = function (fn) {
|
1199
|
+
var domain = getDomain();
|
1200
|
+
unhandledRejectionHandled =
|
1201
|
+
typeof fn === "function" ? (domain === null ? fn : domain.bind(fn))
|
1202
|
+
: undefined;
|
1203
|
+
};
|
1204
|
+
|
1205
|
+
Promise.longStackTraces = function () {
|
1206
|
+
if (async.haveItemsQueued() &&
|
1207
|
+
debugging === false
|
1208
|
+
) {
|
1209
|
+
throw new Error("cannot enable long stack traces after promises have been created\u000a\u000a See http://goo.gl/DT1qyG\u000a");
|
1210
|
+
}
|
1211
|
+
debugging = CapturedTrace.isSupported();
|
1212
|
+
if (debugging) {
|
1213
|
+
async.disableTrampolineIfNecessary();
|
1214
|
+
}
|
1215
|
+
};
|
1216
|
+
|
1217
|
+
Promise.hasLongStackTraces = function () {
|
1218
|
+
return debugging && CapturedTrace.isSupported();
|
1219
|
+
};
|
1220
|
+
|
1221
|
+
if (!CapturedTrace.isSupported()) {
|
1222
|
+
Promise.longStackTraces = function(){};
|
1223
|
+
debugging = false;
|
1224
|
+
}
|
1225
|
+
|
1226
|
+
return function() {
|
1227
|
+
return debugging;
|
1228
|
+
};
|
1229
|
+
};
|
1230
|
+
|
1231
|
+
},{"./async.js":2,"./errors.js":13,"./util.js":38}],11:[function(_dereq_,module,exports){
|
1232
|
+
"use strict";
|
1233
|
+
var util = _dereq_("./util.js");
|
1234
|
+
var isPrimitive = util.isPrimitive;
|
1235
|
+
|
1236
|
+
module.exports = function(Promise) {
|
1237
|
+
var returner = function () {
|
1238
|
+
return this;
|
1239
|
+
};
|
1240
|
+
var thrower = function () {
|
1241
|
+
throw this;
|
1242
|
+
};
|
1243
|
+
var returnUndefined = function() {};
|
1244
|
+
var throwUndefined = function() {
|
1245
|
+
throw undefined;
|
1246
|
+
};
|
1247
|
+
|
1248
|
+
var wrapper = function (value, action) {
|
1249
|
+
if (action === 1) {
|
1250
|
+
return function () {
|
1251
|
+
throw value;
|
1252
|
+
};
|
1253
|
+
} else if (action === 2) {
|
1254
|
+
return function () {
|
1255
|
+
return value;
|
1256
|
+
};
|
1257
|
+
}
|
1258
|
+
};
|
1259
|
+
|
1260
|
+
|
1261
|
+
Promise.prototype["return"] =
|
1262
|
+
Promise.prototype.thenReturn = function (value) {
|
1263
|
+
if (value === undefined) return this.then(returnUndefined);
|
1264
|
+
|
1265
|
+
if (isPrimitive(value)) {
|
1266
|
+
return this._then(
|
1267
|
+
wrapper(value, 2),
|
1268
|
+
undefined,
|
1269
|
+
undefined,
|
1270
|
+
undefined,
|
1271
|
+
undefined
|
1272
|
+
);
|
1273
|
+
}
|
1274
|
+
return this._then(returner, undefined, undefined, value, undefined);
|
1275
|
+
};
|
1276
|
+
|
1277
|
+
Promise.prototype["throw"] =
|
1278
|
+
Promise.prototype.thenThrow = function (reason) {
|
1279
|
+
if (reason === undefined) return this.then(throwUndefined);
|
1280
|
+
|
1281
|
+
if (isPrimitive(reason)) {
|
1282
|
+
return this._then(
|
1283
|
+
wrapper(reason, 1),
|
1284
|
+
undefined,
|
1285
|
+
undefined,
|
1286
|
+
undefined,
|
1287
|
+
undefined
|
1288
|
+
);
|
1289
|
+
}
|
1290
|
+
return this._then(thrower, undefined, undefined, reason, undefined);
|
1291
|
+
};
|
1292
|
+
};
|
1293
|
+
|
1294
|
+
},{"./util.js":38}],12:[function(_dereq_,module,exports){
|
1295
|
+
"use strict";
|
1296
|
+
module.exports = function(Promise, INTERNAL) {
|
1297
|
+
var PromiseReduce = Promise.reduce;
|
1298
|
+
|
1299
|
+
Promise.prototype.each = function (fn) {
|
1300
|
+
return PromiseReduce(this, fn, null, INTERNAL);
|
1301
|
+
};
|
1302
|
+
|
1303
|
+
Promise.each = function (promises, fn) {
|
1304
|
+
return PromiseReduce(promises, fn, null, INTERNAL);
|
1305
|
+
};
|
1306
|
+
};
|
1307
|
+
|
1308
|
+
},{}],13:[function(_dereq_,module,exports){
|
1309
|
+
"use strict";
|
1310
|
+
var es5 = _dereq_("./es5.js");
|
1311
|
+
var Objectfreeze = es5.freeze;
|
1312
|
+
var util = _dereq_("./util.js");
|
1313
|
+
var inherits = util.inherits;
|
1314
|
+
var notEnumerableProp = util.notEnumerableProp;
|
1315
|
+
|
1316
|
+
function subError(nameProperty, defaultMessage) {
|
1317
|
+
function SubError(message) {
|
1318
|
+
if (!(this instanceof SubError)) return new SubError(message);
|
1319
|
+
notEnumerableProp(this, "message",
|
1320
|
+
typeof message === "string" ? message : defaultMessage);
|
1321
|
+
notEnumerableProp(this, "name", nameProperty);
|
1322
|
+
if (Error.captureStackTrace) {
|
1323
|
+
Error.captureStackTrace(this, this.constructor);
|
1324
|
+
} else {
|
1325
|
+
Error.call(this);
|
1326
|
+
}
|
1327
|
+
}
|
1328
|
+
inherits(SubError, Error);
|
1329
|
+
return SubError;
|
1330
|
+
}
|
1331
|
+
|
1332
|
+
var _TypeError, _RangeError;
|
1333
|
+
var Warning = subError("Warning", "warning");
|
1334
|
+
var CancellationError = subError("CancellationError", "cancellation error");
|
1335
|
+
var TimeoutError = subError("TimeoutError", "timeout error");
|
1336
|
+
var AggregateError = subError("AggregateError", "aggregate error");
|
1337
|
+
try {
|
1338
|
+
_TypeError = TypeError;
|
1339
|
+
_RangeError = RangeError;
|
1340
|
+
} catch(e) {
|
1341
|
+
_TypeError = subError("TypeError", "type error");
|
1342
|
+
_RangeError = subError("RangeError", "range error");
|
1343
|
+
}
|
1344
|
+
|
1345
|
+
var methods = ("join pop push shift unshift slice filter forEach some " +
|
1346
|
+
"every map indexOf lastIndexOf reduce reduceRight sort reverse").split(" ");
|
1347
|
+
|
1348
|
+
for (var i = 0; i < methods.length; ++i) {
|
1349
|
+
if (typeof Array.prototype[methods[i]] === "function") {
|
1350
|
+
AggregateError.prototype[methods[i]] = Array.prototype[methods[i]];
|
1351
|
+
}
|
1352
|
+
}
|
1353
|
+
|
1354
|
+
es5.defineProperty(AggregateError.prototype, "length", {
|
1355
|
+
value: 0,
|
1356
|
+
configurable: false,
|
1357
|
+
writable: true,
|
1358
|
+
enumerable: true
|
1359
|
+
});
|
1360
|
+
AggregateError.prototype["isOperational"] = true;
|
1361
|
+
var level = 0;
|
1362
|
+
AggregateError.prototype.toString = function() {
|
1363
|
+
var indent = Array(level * 4 + 1).join(" ");
|
1364
|
+
var ret = "\n" + indent + "AggregateError of:" + "\n";
|
1365
|
+
level++;
|
1366
|
+
indent = Array(level * 4 + 1).join(" ");
|
1367
|
+
for (var i = 0; i < this.length; ++i) {
|
1368
|
+
var str = this[i] === this ? "[Circular AggregateError]" : this[i] + "";
|
1369
|
+
var lines = str.split("\n");
|
1370
|
+
for (var j = 0; j < lines.length; ++j) {
|
1371
|
+
lines[j] = indent + lines[j];
|
1372
|
+
}
|
1373
|
+
str = lines.join("\n");
|
1374
|
+
ret += str + "\n";
|
1375
|
+
}
|
1376
|
+
level--;
|
1377
|
+
return ret;
|
1378
|
+
};
|
1379
|
+
|
1380
|
+
function OperationalError(message) {
|
1381
|
+
if (!(this instanceof OperationalError))
|
1382
|
+
return new OperationalError(message);
|
1383
|
+
notEnumerableProp(this, "name", "OperationalError");
|
1384
|
+
notEnumerableProp(this, "message", message);
|
1385
|
+
this.cause = message;
|
1386
|
+
this["isOperational"] = true;
|
1387
|
+
|
1388
|
+
if (message instanceof Error) {
|
1389
|
+
notEnumerableProp(this, "message", message.message);
|
1390
|
+
notEnumerableProp(this, "stack", message.stack);
|
1391
|
+
} else if (Error.captureStackTrace) {
|
1392
|
+
Error.captureStackTrace(this, this.constructor);
|
1393
|
+
}
|
1394
|
+
|
1395
|
+
}
|
1396
|
+
inherits(OperationalError, Error);
|
1397
|
+
|
1398
|
+
var errorTypes = Error["__BluebirdErrorTypes__"];
|
1399
|
+
if (!errorTypes) {
|
1400
|
+
errorTypes = Objectfreeze({
|
1401
|
+
CancellationError: CancellationError,
|
1402
|
+
TimeoutError: TimeoutError,
|
1403
|
+
OperationalError: OperationalError,
|
1404
|
+
RejectionError: OperationalError,
|
1405
|
+
AggregateError: AggregateError
|
1406
|
+
});
|
1407
|
+
notEnumerableProp(Error, "__BluebirdErrorTypes__", errorTypes);
|
1408
|
+
}
|
1409
|
+
|
1410
|
+
module.exports = {
|
1411
|
+
Error: Error,
|
1412
|
+
TypeError: _TypeError,
|
1413
|
+
RangeError: _RangeError,
|
1414
|
+
CancellationError: errorTypes.CancellationError,
|
1415
|
+
OperationalError: errorTypes.OperationalError,
|
1416
|
+
TimeoutError: errorTypes.TimeoutError,
|
1417
|
+
AggregateError: errorTypes.AggregateError,
|
1418
|
+
Warning: Warning
|
1419
|
+
};
|
1420
|
+
|
1421
|
+
},{"./es5.js":14,"./util.js":38}],14:[function(_dereq_,module,exports){
|
1422
|
+
var isES5 = (function(){
|
1423
|
+
"use strict";
|
1424
|
+
return this === undefined;
|
1425
|
+
})();
|
1426
|
+
|
1427
|
+
if (isES5) {
|
1428
|
+
module.exports = {
|
1429
|
+
freeze: Object.freeze,
|
1430
|
+
defineProperty: Object.defineProperty,
|
1431
|
+
getDescriptor: Object.getOwnPropertyDescriptor,
|
1432
|
+
keys: Object.keys,
|
1433
|
+
names: Object.getOwnPropertyNames,
|
1434
|
+
getPrototypeOf: Object.getPrototypeOf,
|
1435
|
+
isArray: Array.isArray,
|
1436
|
+
isES5: isES5,
|
1437
|
+
propertyIsWritable: function(obj, prop) {
|
1438
|
+
var descriptor = Object.getOwnPropertyDescriptor(obj, prop);
|
1439
|
+
return !!(!descriptor || descriptor.writable || descriptor.set);
|
1440
|
+
}
|
1441
|
+
};
|
1442
|
+
} else {
|
1443
|
+
var has = {}.hasOwnProperty;
|
1444
|
+
var str = {}.toString;
|
1445
|
+
var proto = {}.constructor.prototype;
|
1446
|
+
|
1447
|
+
var ObjectKeys = function (o) {
|
1448
|
+
var ret = [];
|
1449
|
+
for (var key in o) {
|
1450
|
+
if (has.call(o, key)) {
|
1451
|
+
ret.push(key);
|
1452
|
+
}
|
1453
|
+
}
|
1454
|
+
return ret;
|
1455
|
+
};
|
1456
|
+
|
1457
|
+
var ObjectGetDescriptor = function(o, key) {
|
1458
|
+
return {value: o[key]};
|
1459
|
+
};
|
1460
|
+
|
1461
|
+
var ObjectDefineProperty = function (o, key, desc) {
|
1462
|
+
o[key] = desc.value;
|
1463
|
+
return o;
|
1464
|
+
};
|
1465
|
+
|
1466
|
+
var ObjectFreeze = function (obj) {
|
1467
|
+
return obj;
|
1468
|
+
};
|
1469
|
+
|
1470
|
+
var ObjectGetPrototypeOf = function (obj) {
|
1471
|
+
try {
|
1472
|
+
return Object(obj).constructor.prototype;
|
1473
|
+
}
|
1474
|
+
catch (e) {
|
1475
|
+
return proto;
|
1476
|
+
}
|
1477
|
+
};
|
1478
|
+
|
1479
|
+
var ArrayIsArray = function (obj) {
|
1480
|
+
try {
|
1481
|
+
return str.call(obj) === "[object Array]";
|
1482
|
+
}
|
1483
|
+
catch(e) {
|
1484
|
+
return false;
|
1485
|
+
}
|
1486
|
+
};
|
1487
|
+
|
1488
|
+
module.exports = {
|
1489
|
+
isArray: ArrayIsArray,
|
1490
|
+
keys: ObjectKeys,
|
1491
|
+
names: ObjectKeys,
|
1492
|
+
defineProperty: ObjectDefineProperty,
|
1493
|
+
getDescriptor: ObjectGetDescriptor,
|
1494
|
+
freeze: ObjectFreeze,
|
1495
|
+
getPrototypeOf: ObjectGetPrototypeOf,
|
1496
|
+
isES5: isES5,
|
1497
|
+
propertyIsWritable: function() {
|
1498
|
+
return true;
|
1499
|
+
}
|
1500
|
+
};
|
1501
|
+
}
|
1502
|
+
|
1503
|
+
},{}],15:[function(_dereq_,module,exports){
|
1504
|
+
"use strict";
|
1505
|
+
module.exports = function(Promise, INTERNAL) {
|
1506
|
+
var PromiseMap = Promise.map;
|
1507
|
+
|
1508
|
+
Promise.prototype.filter = function (fn, options) {
|
1509
|
+
return PromiseMap(this, fn, options, INTERNAL);
|
1510
|
+
};
|
1511
|
+
|
1512
|
+
Promise.filter = function (promises, fn, options) {
|
1513
|
+
return PromiseMap(promises, fn, options, INTERNAL);
|
1514
|
+
};
|
1515
|
+
};
|
1516
|
+
|
1517
|
+
},{}],16:[function(_dereq_,module,exports){
|
1518
|
+
"use strict";
|
1519
|
+
module.exports = function(Promise, NEXT_FILTER, tryConvertToPromise) {
|
1520
|
+
var util = _dereq_("./util.js");
|
1521
|
+
var isPrimitive = util.isPrimitive;
|
1522
|
+
var thrower = util.thrower;
|
1523
|
+
|
1524
|
+
function returnThis() {
|
1525
|
+
return this;
|
1526
|
+
}
|
1527
|
+
function throwThis() {
|
1528
|
+
throw this;
|
1529
|
+
}
|
1530
|
+
function return$(r) {
|
1531
|
+
return function() {
|
1532
|
+
return r;
|
1533
|
+
};
|
1534
|
+
}
|
1535
|
+
function throw$(r) {
|
1536
|
+
return function() {
|
1537
|
+
throw r;
|
1538
|
+
};
|
1539
|
+
}
|
1540
|
+
function promisedFinally(ret, reasonOrValue, isFulfilled) {
|
1541
|
+
var then;
|
1542
|
+
if (isPrimitive(reasonOrValue)) {
|
1543
|
+
then = isFulfilled ? return$(reasonOrValue) : throw$(reasonOrValue);
|
1544
|
+
} else {
|
1545
|
+
then = isFulfilled ? returnThis : throwThis;
|
1546
|
+
}
|
1547
|
+
return ret._then(then, thrower, undefined, reasonOrValue, undefined);
|
1548
|
+
}
|
1549
|
+
|
1550
|
+
function finallyHandler(reasonOrValue) {
|
1551
|
+
var promise = this.promise;
|
1552
|
+
var handler = this.handler;
|
1553
|
+
|
1554
|
+
var ret = promise._isBound()
|
1555
|
+
? handler.call(promise._boundValue())
|
1556
|
+
: handler();
|
1557
|
+
|
1558
|
+
if (ret !== undefined) {
|
1559
|
+
var maybePromise = tryConvertToPromise(ret, promise);
|
1560
|
+
if (maybePromise instanceof Promise) {
|
1561
|
+
maybePromise = maybePromise._target();
|
1562
|
+
return promisedFinally(maybePromise, reasonOrValue,
|
1563
|
+
promise.isFulfilled());
|
1564
|
+
}
|
1565
|
+
}
|
1566
|
+
|
1567
|
+
if (promise.isRejected()) {
|
1568
|
+
NEXT_FILTER.e = reasonOrValue;
|
1569
|
+
return NEXT_FILTER;
|
1570
|
+
} else {
|
1571
|
+
return reasonOrValue;
|
1572
|
+
}
|
1573
|
+
}
|
1574
|
+
|
1575
|
+
function tapHandler(value) {
|
1576
|
+
var promise = this.promise;
|
1577
|
+
var handler = this.handler;
|
1578
|
+
|
1579
|
+
var ret = promise._isBound()
|
1580
|
+
? handler.call(promise._boundValue(), value)
|
1581
|
+
: handler(value);
|
1582
|
+
|
1583
|
+
if (ret !== undefined) {
|
1584
|
+
var maybePromise = tryConvertToPromise(ret, promise);
|
1585
|
+
if (maybePromise instanceof Promise) {
|
1586
|
+
maybePromise = maybePromise._target();
|
1587
|
+
return promisedFinally(maybePromise, value, true);
|
1588
|
+
}
|
1589
|
+
}
|
1590
|
+
return value;
|
1591
|
+
}
|
1592
|
+
|
1593
|
+
Promise.prototype._passThroughHandler = function (handler, isFinally) {
|
1594
|
+
if (typeof handler !== "function") return this.then();
|
1595
|
+
|
1596
|
+
var promiseAndHandler = {
|
1597
|
+
promise: this,
|
1598
|
+
handler: handler
|
1599
|
+
};
|
1600
|
+
|
1601
|
+
return this._then(
|
1602
|
+
isFinally ? finallyHandler : tapHandler,
|
1603
|
+
isFinally ? finallyHandler : undefined, undefined,
|
1604
|
+
promiseAndHandler, undefined);
|
1605
|
+
};
|
1606
|
+
|
1607
|
+
Promise.prototype.lastly =
|
1608
|
+
Promise.prototype["finally"] = function (handler) {
|
1609
|
+
return this._passThroughHandler(handler, true);
|
1610
|
+
};
|
1611
|
+
|
1612
|
+
Promise.prototype.tap = function (handler) {
|
1613
|
+
return this._passThroughHandler(handler, false);
|
1614
|
+
};
|
1615
|
+
};
|
1616
|
+
|
1617
|
+
},{"./util.js":38}],17:[function(_dereq_,module,exports){
|
1618
|
+
"use strict";
|
1619
|
+
module.exports = function(Promise,
|
1620
|
+
apiRejection,
|
1621
|
+
INTERNAL,
|
1622
|
+
tryConvertToPromise) {
|
1623
|
+
var errors = _dereq_("./errors.js");
|
1624
|
+
var TypeError = errors.TypeError;
|
1625
|
+
var util = _dereq_("./util.js");
|
1626
|
+
var errorObj = util.errorObj;
|
1627
|
+
var tryCatch = util.tryCatch;
|
1628
|
+
var yieldHandlers = [];
|
1629
|
+
|
1630
|
+
function promiseFromYieldHandler(value, yieldHandlers, traceParent) {
|
1631
|
+
for (var i = 0; i < yieldHandlers.length; ++i) {
|
1632
|
+
traceParent._pushContext();
|
1633
|
+
var result = tryCatch(yieldHandlers[i])(value);
|
1634
|
+
traceParent._popContext();
|
1635
|
+
if (result === errorObj) {
|
1636
|
+
traceParent._pushContext();
|
1637
|
+
var ret = Promise.reject(errorObj.e);
|
1638
|
+
traceParent._popContext();
|
1639
|
+
return ret;
|
1640
|
+
}
|
1641
|
+
var maybePromise = tryConvertToPromise(result, traceParent);
|
1642
|
+
if (maybePromise instanceof Promise) return maybePromise;
|
1643
|
+
}
|
1644
|
+
return null;
|
1645
|
+
}
|
1646
|
+
|
1647
|
+
function PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) {
|
1648
|
+
var promise = this._promise = new Promise(INTERNAL);
|
1649
|
+
promise._captureStackTrace();
|
1650
|
+
this._stack = stack;
|
1651
|
+
this._generatorFunction = generatorFunction;
|
1652
|
+
this._receiver = receiver;
|
1653
|
+
this._generator = undefined;
|
1654
|
+
this._yieldHandlers = typeof yieldHandler === "function"
|
1655
|
+
? [yieldHandler].concat(yieldHandlers)
|
1656
|
+
: yieldHandlers;
|
1657
|
+
}
|
1658
|
+
|
1659
|
+
PromiseSpawn.prototype.promise = function () {
|
1660
|
+
return this._promise;
|
1661
|
+
};
|
1662
|
+
|
1663
|
+
PromiseSpawn.prototype._run = function () {
|
1664
|
+
this._generator = this._generatorFunction.call(this._receiver);
|
1665
|
+
this._receiver =
|
1666
|
+
this._generatorFunction = undefined;
|
1667
|
+
this._next(undefined);
|
1668
|
+
};
|
1669
|
+
|
1670
|
+
PromiseSpawn.prototype._continue = function (result) {
|
1671
|
+
if (result === errorObj) {
|
1672
|
+
return this._promise._rejectCallback(result.e, false, true);
|
1673
|
+
}
|
1674
|
+
|
1675
|
+
var value = result.value;
|
1676
|
+
if (result.done === true) {
|
1677
|
+
this._promise._resolveCallback(value);
|
1678
|
+
} else {
|
1679
|
+
var maybePromise = tryConvertToPromise(value, this._promise);
|
1680
|
+
if (!(maybePromise instanceof Promise)) {
|
1681
|
+
maybePromise =
|
1682
|
+
promiseFromYieldHandler(maybePromise,
|
1683
|
+
this._yieldHandlers,
|
1684
|
+
this._promise);
|
1685
|
+
if (maybePromise === null) {
|
1686
|
+
this._throw(
|
1687
|
+
new TypeError(
|
1688
|
+
"A value %s was yielded that could not be treated as a promise\u000a\u000a See http://goo.gl/4Y4pDk\u000a\u000a".replace("%s", value) +
|
1689
|
+
"From coroutine:\u000a" +
|
1690
|
+
this._stack.split("\n").slice(1, -7).join("\n")
|
1691
|
+
)
|
1692
|
+
);
|
1693
|
+
return;
|
1694
|
+
}
|
1695
|
+
}
|
1696
|
+
maybePromise._then(
|
1697
|
+
this._next,
|
1698
|
+
this._throw,
|
1699
|
+
undefined,
|
1700
|
+
this,
|
1701
|
+
null
|
1702
|
+
);
|
1703
|
+
}
|
1704
|
+
};
|
1705
|
+
|
1706
|
+
PromiseSpawn.prototype._throw = function (reason) {
|
1707
|
+
this._promise._attachExtraTrace(reason);
|
1708
|
+
this._promise._pushContext();
|
1709
|
+
var result = tryCatch(this._generator["throw"])
|
1710
|
+
.call(this._generator, reason);
|
1711
|
+
this._promise._popContext();
|
1712
|
+
this._continue(result);
|
1713
|
+
};
|
1714
|
+
|
1715
|
+
PromiseSpawn.prototype._next = function (value) {
|
1716
|
+
this._promise._pushContext();
|
1717
|
+
var result = tryCatch(this._generator.next).call(this._generator, value);
|
1718
|
+
this._promise._popContext();
|
1719
|
+
this._continue(result);
|
1720
|
+
};
|
1721
|
+
|
1722
|
+
Promise.coroutine = function (generatorFunction, options) {
|
1723
|
+
if (typeof generatorFunction !== "function") {
|
1724
|
+
throw new TypeError("generatorFunction must be a function\u000a\u000a See http://goo.gl/6Vqhm0\u000a");
|
1725
|
+
}
|
1726
|
+
var yieldHandler = Object(options).yieldHandler;
|
1727
|
+
var PromiseSpawn$ = PromiseSpawn;
|
1728
|
+
var stack = new Error().stack;
|
1729
|
+
return function () {
|
1730
|
+
var generator = generatorFunction.apply(this, arguments);
|
1731
|
+
var spawn = new PromiseSpawn$(undefined, undefined, yieldHandler,
|
1732
|
+
stack);
|
1733
|
+
spawn._generator = generator;
|
1734
|
+
spawn._next(undefined);
|
1735
|
+
return spawn.promise();
|
1736
|
+
};
|
1737
|
+
};
|
1738
|
+
|
1739
|
+
Promise.coroutine.addYieldHandler = function(fn) {
|
1740
|
+
if (typeof fn !== "function") throw new TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
|
1741
|
+
yieldHandlers.push(fn);
|
1742
|
+
};
|
1743
|
+
|
1744
|
+
Promise.spawn = function (generatorFunction) {
|
1745
|
+
if (typeof generatorFunction !== "function") {
|
1746
|
+
return apiRejection("generatorFunction must be a function\u000a\u000a See http://goo.gl/6Vqhm0\u000a");
|
1747
|
+
}
|
1748
|
+
var spawn = new PromiseSpawn(generatorFunction, this);
|
1749
|
+
var ret = spawn.promise();
|
1750
|
+
spawn._run(Promise.spawn);
|
1751
|
+
return ret;
|
1752
|
+
};
|
1753
|
+
};
|
1754
|
+
|
1755
|
+
},{"./errors.js":13,"./util.js":38}],18:[function(_dereq_,module,exports){
|
1756
|
+
"use strict";
|
1757
|
+
module.exports =
|
1758
|
+
function(Promise, PromiseArray, tryConvertToPromise, INTERNAL) {
|
1759
|
+
var util = _dereq_("./util.js");
|
1760
|
+
var canEvaluate = util.canEvaluate;
|
1761
|
+
var tryCatch = util.tryCatch;
|
1762
|
+
var errorObj = util.errorObj;
|
1763
|
+
var reject;
|
1764
|
+
|
1765
|
+
if (!true) {
|
1766
|
+
if (canEvaluate) {
|
1767
|
+
var thenCallback = function(i) {
|
1768
|
+
return new Function("value", "holder", " \n\
|
1769
|
+
'use strict'; \n\
|
1770
|
+
holder.pIndex = value; \n\
|
1771
|
+
holder.checkFulfillment(this); \n\
|
1772
|
+
".replace(/Index/g, i));
|
1773
|
+
};
|
1774
|
+
|
1775
|
+
var caller = function(count) {
|
1776
|
+
var values = [];
|
1777
|
+
for (var i = 1; i <= count; ++i) values.push("holder.p" + i);
|
1778
|
+
return new Function("holder", " \n\
|
1779
|
+
'use strict'; \n\
|
1780
|
+
var callback = holder.fn; \n\
|
1781
|
+
return callback(values); \n\
|
1782
|
+
".replace(/values/g, values.join(", ")));
|
1783
|
+
};
|
1784
|
+
var thenCallbacks = [];
|
1785
|
+
var callers = [undefined];
|
1786
|
+
for (var i = 1; i <= 5; ++i) {
|
1787
|
+
thenCallbacks.push(thenCallback(i));
|
1788
|
+
callers.push(caller(i));
|
1789
|
+
}
|
1790
|
+
|
1791
|
+
var Holder = function(total, fn) {
|
1792
|
+
this.p1 = this.p2 = this.p3 = this.p4 = this.p5 = null;
|
1793
|
+
this.fn = fn;
|
1794
|
+
this.total = total;
|
1795
|
+
this.now = 0;
|
1796
|
+
};
|
1797
|
+
|
1798
|
+
Holder.prototype.callers = callers;
|
1799
|
+
Holder.prototype.checkFulfillment = function(promise) {
|
1800
|
+
var now = this.now;
|
1801
|
+
now++;
|
1802
|
+
var total = this.total;
|
1803
|
+
if (now >= total) {
|
1804
|
+
var handler = this.callers[total];
|
1805
|
+
promise._pushContext();
|
1806
|
+
var ret = tryCatch(handler)(this);
|
1807
|
+
promise._popContext();
|
1808
|
+
if (ret === errorObj) {
|
1809
|
+
promise._rejectCallback(ret.e, false, true);
|
1810
|
+
} else {
|
1811
|
+
promise._resolveCallback(ret);
|
1812
|
+
}
|
1813
|
+
} else {
|
1814
|
+
this.now = now;
|
1815
|
+
}
|
1816
|
+
};
|
1817
|
+
|
1818
|
+
var reject = function (reason) {
|
1819
|
+
this._reject(reason);
|
1820
|
+
};
|
1821
|
+
}
|
1822
|
+
}
|
1823
|
+
|
1824
|
+
Promise.join = function () {
|
1825
|
+
var last = arguments.length - 1;
|
1826
|
+
var fn;
|
1827
|
+
if (last > 0 && typeof arguments[last] === "function") {
|
1828
|
+
fn = arguments[last];
|
1829
|
+
if (!true) {
|
1830
|
+
if (last < 6 && canEvaluate) {
|
1831
|
+
var ret = new Promise(INTERNAL);
|
1832
|
+
ret._captureStackTrace();
|
1833
|
+
var holder = new Holder(last, fn);
|
1834
|
+
var callbacks = thenCallbacks;
|
1835
|
+
for (var i = 0; i < last; ++i) {
|
1836
|
+
var maybePromise = tryConvertToPromise(arguments[i], ret);
|
1837
|
+
if (maybePromise instanceof Promise) {
|
1838
|
+
maybePromise = maybePromise._target();
|
1839
|
+
if (maybePromise._isPending()) {
|
1840
|
+
maybePromise._then(callbacks[i], reject,
|
1841
|
+
undefined, ret, holder);
|
1842
|
+
} else if (maybePromise._isFulfilled()) {
|
1843
|
+
callbacks[i].call(ret,
|
1844
|
+
maybePromise._value(), holder);
|
1845
|
+
} else {
|
1846
|
+
ret._reject(maybePromise._reason());
|
1847
|
+
}
|
1848
|
+
} else {
|
1849
|
+
callbacks[i].call(ret, maybePromise, holder);
|
1850
|
+
}
|
1851
|
+
}
|
1852
|
+
return ret;
|
1853
|
+
}
|
1854
|
+
}
|
1855
|
+
}
|
1856
|
+
var $_len = arguments.length;var args = new Array($_len); for(var $_i = 0; $_i < $_len; ++$_i) {args[$_i] = arguments[$_i];}
|
1857
|
+
if (fn) args.pop();
|
1858
|
+
var ret = new PromiseArray(args).promise();
|
1859
|
+
return fn !== undefined ? ret.spread(fn) : ret;
|
1860
|
+
};
|
1861
|
+
|
1862
|
+
};
|
1863
|
+
|
1864
|
+
},{"./util.js":38}],19:[function(_dereq_,module,exports){
|
1865
|
+
"use strict";
|
1866
|
+
module.exports = function(Promise,
|
1867
|
+
PromiseArray,
|
1868
|
+
apiRejection,
|
1869
|
+
tryConvertToPromise,
|
1870
|
+
INTERNAL) {
|
1871
|
+
var getDomain = Promise._getDomain;
|
1872
|
+
var async = _dereq_("./async.js");
|
1873
|
+
var util = _dereq_("./util.js");
|
1874
|
+
var tryCatch = util.tryCatch;
|
1875
|
+
var errorObj = util.errorObj;
|
1876
|
+
var PENDING = {};
|
1877
|
+
var EMPTY_ARRAY = [];
|
1878
|
+
|
1879
|
+
function MappingPromiseArray(promises, fn, limit, _filter) {
|
1880
|
+
this.constructor$(promises);
|
1881
|
+
this._promise._captureStackTrace();
|
1882
|
+
var domain = getDomain();
|
1883
|
+
this._callback = domain === null ? fn : domain.bind(fn);
|
1884
|
+
this._preservedValues = _filter === INTERNAL
|
1885
|
+
? new Array(this.length())
|
1886
|
+
: null;
|
1887
|
+
this._limit = limit;
|
1888
|
+
this._inFlight = 0;
|
1889
|
+
this._queue = limit >= 1 ? [] : EMPTY_ARRAY;
|
1890
|
+
async.invoke(init, this, undefined);
|
1891
|
+
}
|
1892
|
+
util.inherits(MappingPromiseArray, PromiseArray);
|
1893
|
+
function init() {this._init$(undefined, -2);}
|
1894
|
+
|
1895
|
+
MappingPromiseArray.prototype._init = function () {};
|
1896
|
+
|
1897
|
+
MappingPromiseArray.prototype._promiseFulfilled = function (value, index) {
|
1898
|
+
var values = this._values;
|
1899
|
+
var length = this.length();
|
1900
|
+
var preservedValues = this._preservedValues;
|
1901
|
+
var limit = this._limit;
|
1902
|
+
if (values[index] === PENDING) {
|
1903
|
+
values[index] = value;
|
1904
|
+
if (limit >= 1) {
|
1905
|
+
this._inFlight--;
|
1906
|
+
this._drainQueue();
|
1907
|
+
if (this._isResolved()) return;
|
1908
|
+
}
|
1909
|
+
} else {
|
1910
|
+
if (limit >= 1 && this._inFlight >= limit) {
|
1911
|
+
values[index] = value;
|
1912
|
+
this._queue.push(index);
|
1913
|
+
return;
|
1914
|
+
}
|
1915
|
+
if (preservedValues !== null) preservedValues[index] = value;
|
1916
|
+
|
1917
|
+
var callback = this._callback;
|
1918
|
+
var receiver = this._promise._boundValue();
|
1919
|
+
this._promise._pushContext();
|
1920
|
+
var ret = tryCatch(callback).call(receiver, value, index, length);
|
1921
|
+
this._promise._popContext();
|
1922
|
+
if (ret === errorObj) return this._reject(ret.e);
|
1923
|
+
|
1924
|
+
var maybePromise = tryConvertToPromise(ret, this._promise);
|
1925
|
+
if (maybePromise instanceof Promise) {
|
1926
|
+
maybePromise = maybePromise._target();
|
1927
|
+
if (maybePromise._isPending()) {
|
1928
|
+
if (limit >= 1) this._inFlight++;
|
1929
|
+
values[index] = PENDING;
|
1930
|
+
return maybePromise._proxyPromiseArray(this, index);
|
1931
|
+
} else if (maybePromise._isFulfilled()) {
|
1932
|
+
ret = maybePromise._value();
|
1933
|
+
} else {
|
1934
|
+
return this._reject(maybePromise._reason());
|
1935
|
+
}
|
1936
|
+
}
|
1937
|
+
values[index] = ret;
|
1938
|
+
}
|
1939
|
+
var totalResolved = ++this._totalResolved;
|
1940
|
+
if (totalResolved >= length) {
|
1941
|
+
if (preservedValues !== null) {
|
1942
|
+
this._filter(values, preservedValues);
|
1943
|
+
} else {
|
1944
|
+
this._resolve(values);
|
1945
|
+
}
|
1946
|
+
|
1947
|
+
}
|
1948
|
+
};
|
1949
|
+
|
1950
|
+
MappingPromiseArray.prototype._drainQueue = function () {
|
1951
|
+
var queue = this._queue;
|
1952
|
+
var limit = this._limit;
|
1953
|
+
var values = this._values;
|
1954
|
+
while (queue.length > 0 && this._inFlight < limit) {
|
1955
|
+
if (this._isResolved()) return;
|
1956
|
+
var index = queue.pop();
|
1957
|
+
this._promiseFulfilled(values[index], index);
|
1958
|
+
}
|
1959
|
+
};
|
1960
|
+
|
1961
|
+
MappingPromiseArray.prototype._filter = function (booleans, values) {
|
1962
|
+
var len = values.length;
|
1963
|
+
var ret = new Array(len);
|
1964
|
+
var j = 0;
|
1965
|
+
for (var i = 0; i < len; ++i) {
|
1966
|
+
if (booleans[i]) ret[j++] = values[i];
|
1967
|
+
}
|
1968
|
+
ret.length = j;
|
1969
|
+
this._resolve(ret);
|
1970
|
+
};
|
1971
|
+
|
1972
|
+
MappingPromiseArray.prototype.preservedValues = function () {
|
1973
|
+
return this._preservedValues;
|
1974
|
+
};
|
1975
|
+
|
1976
|
+
function map(promises, fn, options, _filter) {
|
1977
|
+
var limit = typeof options === "object" && options !== null
|
1978
|
+
? options.concurrency
|
1979
|
+
: 0;
|
1980
|
+
limit = typeof limit === "number" &&
|
1981
|
+
isFinite(limit) && limit >= 1 ? limit : 0;
|
1982
|
+
return new MappingPromiseArray(promises, fn, limit, _filter);
|
1983
|
+
}
|
1984
|
+
|
1985
|
+
Promise.prototype.map = function (fn, options) {
|
1986
|
+
if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
|
1987
|
+
|
1988
|
+
return map(this, fn, options, null).promise();
|
1989
|
+
};
|
1990
|
+
|
1991
|
+
Promise.map = function (promises, fn, options, _filter) {
|
1992
|
+
if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
|
1993
|
+
return map(promises, fn, options, _filter).promise();
|
1994
|
+
};
|
1995
|
+
|
1996
|
+
|
1997
|
+
};
|
1998
|
+
|
1999
|
+
},{"./async.js":2,"./util.js":38}],20:[function(_dereq_,module,exports){
|
2000
|
+
"use strict";
|
2001
|
+
module.exports =
|
2002
|
+
function(Promise, INTERNAL, tryConvertToPromise, apiRejection) {
|
2003
|
+
var util = _dereq_("./util.js");
|
2004
|
+
var tryCatch = util.tryCatch;
|
2005
|
+
|
2006
|
+
Promise.method = function (fn) {
|
2007
|
+
if (typeof fn !== "function") {
|
2008
|
+
throw new Promise.TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
|
2009
|
+
}
|
2010
|
+
return function () {
|
2011
|
+
var ret = new Promise(INTERNAL);
|
2012
|
+
ret._captureStackTrace();
|
2013
|
+
ret._pushContext();
|
2014
|
+
var value = tryCatch(fn).apply(this, arguments);
|
2015
|
+
ret._popContext();
|
2016
|
+
ret._resolveFromSyncValue(value);
|
2017
|
+
return ret;
|
2018
|
+
};
|
2019
|
+
};
|
2020
|
+
|
2021
|
+
Promise.attempt = Promise["try"] = function (fn, args, ctx) {
|
2022
|
+
if (typeof fn !== "function") {
|
2023
|
+
return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
|
2024
|
+
}
|
2025
|
+
var ret = new Promise(INTERNAL);
|
2026
|
+
ret._captureStackTrace();
|
2027
|
+
ret._pushContext();
|
2028
|
+
var value = util.isArray(args)
|
2029
|
+
? tryCatch(fn).apply(ctx, args)
|
2030
|
+
: tryCatch(fn).call(ctx, args);
|
2031
|
+
ret._popContext();
|
2032
|
+
ret._resolveFromSyncValue(value);
|
2033
|
+
return ret;
|
2034
|
+
};
|
2035
|
+
|
2036
|
+
Promise.prototype._resolveFromSyncValue = function (value) {
|
2037
|
+
if (value === util.errorObj) {
|
2038
|
+
this._rejectCallback(value.e, false, true);
|
2039
|
+
} else {
|
2040
|
+
this._resolveCallback(value, true);
|
2041
|
+
}
|
2042
|
+
};
|
2043
|
+
};
|
2044
|
+
|
2045
|
+
},{"./util.js":38}],21:[function(_dereq_,module,exports){
|
2046
|
+
"use strict";
|
2047
|
+
module.exports = function(Promise) {
|
2048
|
+
var util = _dereq_("./util.js");
|
2049
|
+
var async = _dereq_("./async.js");
|
2050
|
+
var tryCatch = util.tryCatch;
|
2051
|
+
var errorObj = util.errorObj;
|
2052
|
+
|
2053
|
+
function spreadAdapter(val, nodeback) {
|
2054
|
+
var promise = this;
|
2055
|
+
if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback);
|
2056
|
+
var ret =
|
2057
|
+
tryCatch(nodeback).apply(promise._boundValue(), [null].concat(val));
|
2058
|
+
if (ret === errorObj) {
|
2059
|
+
async.throwLater(ret.e);
|
2060
|
+
}
|
2061
|
+
}
|
2062
|
+
|
2063
|
+
function successAdapter(val, nodeback) {
|
2064
|
+
var promise = this;
|
2065
|
+
var receiver = promise._boundValue();
|
2066
|
+
var ret = val === undefined
|
2067
|
+
? tryCatch(nodeback).call(receiver, null)
|
2068
|
+
: tryCatch(nodeback).call(receiver, null, val);
|
2069
|
+
if (ret === errorObj) {
|
2070
|
+
async.throwLater(ret.e);
|
2071
|
+
}
|
2072
|
+
}
|
2073
|
+
function errorAdapter(reason, nodeback) {
|
2074
|
+
var promise = this;
|
2075
|
+
if (!reason) {
|
2076
|
+
var target = promise._target();
|
2077
|
+
var newReason = target._getCarriedStackTrace();
|
2078
|
+
newReason.cause = reason;
|
2079
|
+
reason = newReason;
|
2080
|
+
}
|
2081
|
+
var ret = tryCatch(nodeback).call(promise._boundValue(), reason);
|
2082
|
+
if (ret === errorObj) {
|
2083
|
+
async.throwLater(ret.e);
|
2084
|
+
}
|
2085
|
+
}
|
2086
|
+
|
2087
|
+
Promise.prototype.asCallback =
|
2088
|
+
Promise.prototype.nodeify = function (nodeback, options) {
|
2089
|
+
if (typeof nodeback == "function") {
|
2090
|
+
var adapter = successAdapter;
|
2091
|
+
if (options !== undefined && Object(options).spread) {
|
2092
|
+
adapter = spreadAdapter;
|
2093
|
+
}
|
2094
|
+
this._then(
|
2095
|
+
adapter,
|
2096
|
+
errorAdapter,
|
2097
|
+
undefined,
|
2098
|
+
this,
|
2099
|
+
nodeback
|
2100
|
+
);
|
2101
|
+
}
|
2102
|
+
return this;
|
2103
|
+
};
|
2104
|
+
};
|
2105
|
+
|
2106
|
+
},{"./async.js":2,"./util.js":38}],22:[function(_dereq_,module,exports){
|
2107
|
+
"use strict";
|
2108
|
+
module.exports = function(Promise, PromiseArray) {
|
2109
|
+
var util = _dereq_("./util.js");
|
2110
|
+
var async = _dereq_("./async.js");
|
2111
|
+
var tryCatch = util.tryCatch;
|
2112
|
+
var errorObj = util.errorObj;
|
2113
|
+
|
2114
|
+
Promise.prototype.progressed = function (handler) {
|
2115
|
+
return this._then(undefined, undefined, handler, undefined, undefined);
|
2116
|
+
};
|
2117
|
+
|
2118
|
+
Promise.prototype._progress = function (progressValue) {
|
2119
|
+
if (this._isFollowingOrFulfilledOrRejected()) return;
|
2120
|
+
this._target()._progressUnchecked(progressValue);
|
2121
|
+
|
2122
|
+
};
|
2123
|
+
|
2124
|
+
Promise.prototype._progressHandlerAt = function (index) {
|
2125
|
+
return index === 0
|
2126
|
+
? this._progressHandler0
|
2127
|
+
: this[(index << 2) + index - 5 + 2];
|
2128
|
+
};
|
2129
|
+
|
2130
|
+
Promise.prototype._doProgressWith = function (progression) {
|
2131
|
+
var progressValue = progression.value;
|
2132
|
+
var handler = progression.handler;
|
2133
|
+
var promise = progression.promise;
|
2134
|
+
var receiver = progression.receiver;
|
2135
|
+
|
2136
|
+
var ret = tryCatch(handler).call(receiver, progressValue);
|
2137
|
+
if (ret === errorObj) {
|
2138
|
+
if (ret.e != null &&
|
2139
|
+
ret.e.name !== "StopProgressPropagation") {
|
2140
|
+
var trace = util.canAttachTrace(ret.e)
|
2141
|
+
? ret.e : new Error(util.toString(ret.e));
|
2142
|
+
promise._attachExtraTrace(trace);
|
2143
|
+
promise._progress(ret.e);
|
2144
|
+
}
|
2145
|
+
} else if (ret instanceof Promise) {
|
2146
|
+
ret._then(promise._progress, null, null, promise, undefined);
|
2147
|
+
} else {
|
2148
|
+
promise._progress(ret);
|
2149
|
+
}
|
2150
|
+
};
|
2151
|
+
|
2152
|
+
|
2153
|
+
Promise.prototype._progressUnchecked = function (progressValue) {
|
2154
|
+
var len = this._length();
|
2155
|
+
var progress = this._progress;
|
2156
|
+
for (var i = 0; i < len; i++) {
|
2157
|
+
var handler = this._progressHandlerAt(i);
|
2158
|
+
var promise = this._promiseAt(i);
|
2159
|
+
if (!(promise instanceof Promise)) {
|
2160
|
+
var receiver = this._receiverAt(i);
|
2161
|
+
if (typeof handler === "function") {
|
2162
|
+
handler.call(receiver, progressValue, promise);
|
2163
|
+
} else if (receiver instanceof PromiseArray &&
|
2164
|
+
!receiver._isResolved()) {
|
2165
|
+
receiver._promiseProgressed(progressValue, promise);
|
2166
|
+
}
|
2167
|
+
continue;
|
2168
|
+
}
|
2169
|
+
|
2170
|
+
if (typeof handler === "function") {
|
2171
|
+
async.invoke(this._doProgressWith, this, {
|
2172
|
+
handler: handler,
|
2173
|
+
promise: promise,
|
2174
|
+
receiver: this._receiverAt(i),
|
2175
|
+
value: progressValue
|
2176
|
+
});
|
2177
|
+
} else {
|
2178
|
+
async.invoke(progress, promise, progressValue);
|
2179
|
+
}
|
2180
|
+
}
|
2181
|
+
};
|
2182
|
+
};
|
2183
|
+
|
2184
|
+
},{"./async.js":2,"./util.js":38}],23:[function(_dereq_,module,exports){
|
2185
|
+
"use strict";
|
2186
|
+
module.exports = function() {
|
2187
|
+
var makeSelfResolutionError = function () {
|
2188
|
+
return new TypeError("circular promise resolution chain\u000a\u000a See http://goo.gl/LhFpo0\u000a");
|
2189
|
+
};
|
2190
|
+
var reflect = function() {
|
2191
|
+
return new Promise.PromiseInspection(this._target());
|
2192
|
+
};
|
2193
|
+
var apiRejection = function(msg) {
|
2194
|
+
return Promise.reject(new TypeError(msg));
|
2195
|
+
};
|
2196
|
+
|
2197
|
+
var util = _dereq_("./util.js");
|
2198
|
+
|
2199
|
+
var getDomain;
|
2200
|
+
if (util.isNode) {
|
2201
|
+
getDomain = function() {
|
2202
|
+
var ret = process.domain;
|
2203
|
+
if (ret === undefined) ret = null;
|
2204
|
+
return ret;
|
2205
|
+
};
|
2206
|
+
} else {
|
2207
|
+
getDomain = function() {
|
2208
|
+
return null;
|
2209
|
+
};
|
2210
|
+
}
|
2211
|
+
util.notEnumerableProp(Promise, "_getDomain", getDomain);
|
2212
|
+
|
2213
|
+
var async = _dereq_("./async.js");
|
2214
|
+
var errors = _dereq_("./errors.js");
|
2215
|
+
var TypeError = Promise.TypeError = errors.TypeError;
|
2216
|
+
Promise.RangeError = errors.RangeError;
|
2217
|
+
Promise.CancellationError = errors.CancellationError;
|
2218
|
+
Promise.TimeoutError = errors.TimeoutError;
|
2219
|
+
Promise.OperationalError = errors.OperationalError;
|
2220
|
+
Promise.RejectionError = errors.OperationalError;
|
2221
|
+
Promise.AggregateError = errors.AggregateError;
|
2222
|
+
var INTERNAL = function(){};
|
2223
|
+
var APPLY = {};
|
2224
|
+
var NEXT_FILTER = {e: null};
|
2225
|
+
var tryConvertToPromise = _dereq_("./thenables.js")(Promise, INTERNAL);
|
2226
|
+
var PromiseArray =
|
2227
|
+
_dereq_("./promise_array.js")(Promise, INTERNAL,
|
2228
|
+
tryConvertToPromise, apiRejection);
|
2229
|
+
var CapturedTrace = _dereq_("./captured_trace.js")();
|
2230
|
+
var isDebugging = _dereq_("./debuggability.js")(Promise, CapturedTrace);
|
2231
|
+
/*jshint unused:false*/
|
2232
|
+
var createContext =
|
2233
|
+
_dereq_("./context.js")(Promise, CapturedTrace, isDebugging);
|
2234
|
+
var CatchFilter = _dereq_("./catch_filter.js")(NEXT_FILTER);
|
2235
|
+
var PromiseResolver = _dereq_("./promise_resolver.js");
|
2236
|
+
var nodebackForPromise = PromiseResolver._nodebackForPromise;
|
2237
|
+
var errorObj = util.errorObj;
|
2238
|
+
var tryCatch = util.tryCatch;
|
2239
|
+
function Promise(resolver) {
|
2240
|
+
if (typeof resolver !== "function") {
|
2241
|
+
throw new TypeError("the promise constructor requires a resolver function\u000a\u000a See http://goo.gl/EC22Yn\u000a");
|
2242
|
+
}
|
2243
|
+
if (this.constructor !== Promise) {
|
2244
|
+
throw new TypeError("the promise constructor cannot be invoked directly\u000a\u000a See http://goo.gl/KsIlge\u000a");
|
2245
|
+
}
|
2246
|
+
this._bitField = 0;
|
2247
|
+
this._fulfillmentHandler0 = undefined;
|
2248
|
+
this._rejectionHandler0 = undefined;
|
2249
|
+
this._progressHandler0 = undefined;
|
2250
|
+
this._promise0 = undefined;
|
2251
|
+
this._receiver0 = undefined;
|
2252
|
+
this._settledValue = undefined;
|
2253
|
+
if (resolver !== INTERNAL) this._resolveFromResolver(resolver);
|
2254
|
+
}
|
2255
|
+
|
2256
|
+
Promise.prototype.toString = function () {
|
2257
|
+
return "[object Promise]";
|
2258
|
+
};
|
2259
|
+
|
2260
|
+
Promise.prototype.caught = Promise.prototype["catch"] = function (fn) {
|
2261
|
+
var len = arguments.length;
|
2262
|
+
if (len > 1) {
|
2263
|
+
var catchInstances = new Array(len - 1),
|
2264
|
+
j = 0, i;
|
2265
|
+
for (i = 0; i < len - 1; ++i) {
|
2266
|
+
var item = arguments[i];
|
2267
|
+
if (typeof item === "function") {
|
2268
|
+
catchInstances[j++] = item;
|
2269
|
+
} else {
|
2270
|
+
return Promise.reject(
|
2271
|
+
new TypeError("Catch filter must inherit from Error or be a simple predicate function\u000a\u000a See http://goo.gl/o84o68\u000a"));
|
2272
|
+
}
|
2273
|
+
}
|
2274
|
+
catchInstances.length = j;
|
2275
|
+
fn = arguments[i];
|
2276
|
+
var catchFilter = new CatchFilter(catchInstances, fn, this);
|
2277
|
+
return this._then(undefined, catchFilter.doFilter, undefined,
|
2278
|
+
catchFilter, undefined);
|
2279
|
+
}
|
2280
|
+
return this._then(undefined, fn, undefined, undefined, undefined);
|
2281
|
+
};
|
2282
|
+
|
2283
|
+
Promise.prototype.reflect = function () {
|
2284
|
+
return this._then(reflect, reflect, undefined, this, undefined);
|
2285
|
+
};
|
2286
|
+
|
2287
|
+
Promise.prototype.then = function (didFulfill, didReject, didProgress) {
|
2288
|
+
if (isDebugging() && arguments.length > 0 &&
|
2289
|
+
typeof didFulfill !== "function" &&
|
2290
|
+
typeof didReject !== "function") {
|
2291
|
+
var msg = ".then() only accepts functions but was passed: " +
|
2292
|
+
util.classString(didFulfill);
|
2293
|
+
if (arguments.length > 1) {
|
2294
|
+
msg += ", " + util.classString(didReject);
|
2295
|
+
}
|
2296
|
+
this._warn(msg);
|
2297
|
+
}
|
2298
|
+
return this._then(didFulfill, didReject, didProgress,
|
2299
|
+
undefined, undefined);
|
2300
|
+
};
|
2301
|
+
|
2302
|
+
Promise.prototype.done = function (didFulfill, didReject, didProgress) {
|
2303
|
+
var promise = this._then(didFulfill, didReject, didProgress,
|
2304
|
+
undefined, undefined);
|
2305
|
+
promise._setIsFinal();
|
2306
|
+
};
|
2307
|
+
|
2308
|
+
Promise.prototype.spread = function (didFulfill, didReject) {
|
2309
|
+
return this.all()._then(didFulfill, didReject, undefined, APPLY, undefined);
|
2310
|
+
};
|
2311
|
+
|
2312
|
+
Promise.prototype.isCancellable = function () {
|
2313
|
+
return !this.isResolved() &&
|
2314
|
+
this._cancellable();
|
2315
|
+
};
|
2316
|
+
|
2317
|
+
Promise.prototype.toJSON = function () {
|
2318
|
+
var ret = {
|
2319
|
+
isFulfilled: false,
|
2320
|
+
isRejected: false,
|
2321
|
+
fulfillmentValue: undefined,
|
2322
|
+
rejectionReason: undefined
|
2323
|
+
};
|
2324
|
+
if (this.isFulfilled()) {
|
2325
|
+
ret.fulfillmentValue = this.value();
|
2326
|
+
ret.isFulfilled = true;
|
2327
|
+
} else if (this.isRejected()) {
|
2328
|
+
ret.rejectionReason = this.reason();
|
2329
|
+
ret.isRejected = true;
|
2330
|
+
}
|
2331
|
+
return ret;
|
2332
|
+
};
|
2333
|
+
|
2334
|
+
Promise.prototype.all = function () {
|
2335
|
+
return new PromiseArray(this).promise();
|
2336
|
+
};
|
2337
|
+
|
2338
|
+
Promise.prototype.error = function (fn) {
|
2339
|
+
return this.caught(util.originatesFromRejection, fn);
|
2340
|
+
};
|
2341
|
+
|
2342
|
+
Promise.is = function (val) {
|
2343
|
+
return val instanceof Promise;
|
2344
|
+
};
|
2345
|
+
|
2346
|
+
Promise.fromNode = function(fn) {
|
2347
|
+
var ret = new Promise(INTERNAL);
|
2348
|
+
var result = tryCatch(fn)(nodebackForPromise(ret));
|
2349
|
+
if (result === errorObj) {
|
2350
|
+
ret._rejectCallback(result.e, true, true);
|
2351
|
+
}
|
2352
|
+
return ret;
|
2353
|
+
};
|
2354
|
+
|
2355
|
+
Promise.all = function (promises) {
|
2356
|
+
return new PromiseArray(promises).promise();
|
2357
|
+
};
|
2358
|
+
|
2359
|
+
Promise.defer = Promise.pending = function () {
|
2360
|
+
var promise = new Promise(INTERNAL);
|
2361
|
+
return new PromiseResolver(promise);
|
2362
|
+
};
|
2363
|
+
|
2364
|
+
Promise.cast = function (obj) {
|
2365
|
+
var ret = tryConvertToPromise(obj);
|
2366
|
+
if (!(ret instanceof Promise)) {
|
2367
|
+
var val = ret;
|
2368
|
+
ret = new Promise(INTERNAL);
|
2369
|
+
ret._fulfillUnchecked(val);
|
2370
|
+
}
|
2371
|
+
return ret;
|
2372
|
+
};
|
2373
|
+
|
2374
|
+
Promise.resolve = Promise.fulfilled = Promise.cast;
|
2375
|
+
|
2376
|
+
Promise.reject = Promise.rejected = function (reason) {
|
2377
|
+
var ret = new Promise(INTERNAL);
|
2378
|
+
ret._captureStackTrace();
|
2379
|
+
ret._rejectCallback(reason, true);
|
2380
|
+
return ret;
|
2381
|
+
};
|
2382
|
+
|
2383
|
+
Promise.setScheduler = function(fn) {
|
2384
|
+
if (typeof fn !== "function") throw new TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
|
2385
|
+
var prev = async._schedule;
|
2386
|
+
async._schedule = fn;
|
2387
|
+
return prev;
|
2388
|
+
};
|
2389
|
+
|
2390
|
+
Promise.prototype._then = function (
|
2391
|
+
didFulfill,
|
2392
|
+
didReject,
|
2393
|
+
didProgress,
|
2394
|
+
receiver,
|
2395
|
+
internalData
|
2396
|
+
) {
|
2397
|
+
var haveInternalData = internalData !== undefined;
|
2398
|
+
var ret = haveInternalData ? internalData : new Promise(INTERNAL);
|
2399
|
+
|
2400
|
+
if (!haveInternalData) {
|
2401
|
+
ret._propagateFrom(this, 4 | 1);
|
2402
|
+
ret._captureStackTrace();
|
2403
|
+
}
|
2404
|
+
|
2405
|
+
var target = this._target();
|
2406
|
+
if (target !== this) {
|
2407
|
+
if (receiver === undefined) receiver = this._boundTo;
|
2408
|
+
if (!haveInternalData) ret._setIsMigrated();
|
2409
|
+
}
|
2410
|
+
|
2411
|
+
var callbackIndex = target._addCallbacks(didFulfill,
|
2412
|
+
didReject,
|
2413
|
+
didProgress,
|
2414
|
+
ret,
|
2415
|
+
receiver,
|
2416
|
+
getDomain());
|
2417
|
+
|
2418
|
+
if (target._isResolved() && !target._isSettlePromisesQueued()) {
|
2419
|
+
async.invoke(
|
2420
|
+
target._settlePromiseAtPostResolution, target, callbackIndex);
|
2421
|
+
}
|
2422
|
+
|
2423
|
+
return ret;
|
2424
|
+
};
|
2425
|
+
|
2426
|
+
Promise.prototype._settlePromiseAtPostResolution = function (index) {
|
2427
|
+
if (this._isRejectionUnhandled()) this._unsetRejectionIsUnhandled();
|
2428
|
+
this._settlePromiseAt(index);
|
2429
|
+
};
|
2430
|
+
|
2431
|
+
Promise.prototype._length = function () {
|
2432
|
+
return this._bitField & 131071;
|
2433
|
+
};
|
2434
|
+
|
2435
|
+
Promise.prototype._isFollowingOrFulfilledOrRejected = function () {
|
2436
|
+
return (this._bitField & 939524096) > 0;
|
2437
|
+
};
|
2438
|
+
|
2439
|
+
Promise.prototype._isFollowing = function () {
|
2440
|
+
return (this._bitField & 536870912) === 536870912;
|
2441
|
+
};
|
2442
|
+
|
2443
|
+
Promise.prototype._setLength = function (len) {
|
2444
|
+
this._bitField = (this._bitField & -131072) |
|
2445
|
+
(len & 131071);
|
2446
|
+
};
|
2447
|
+
|
2448
|
+
Promise.prototype._setFulfilled = function () {
|
2449
|
+
this._bitField = this._bitField | 268435456;
|
2450
|
+
};
|
2451
|
+
|
2452
|
+
Promise.prototype._setRejected = function () {
|
2453
|
+
this._bitField = this._bitField | 134217728;
|
2454
|
+
};
|
2455
|
+
|
2456
|
+
Promise.prototype._setFollowing = function () {
|
2457
|
+
this._bitField = this._bitField | 536870912;
|
2458
|
+
};
|
2459
|
+
|
2460
|
+
Promise.prototype._setIsFinal = function () {
|
2461
|
+
this._bitField = this._bitField | 33554432;
|
2462
|
+
};
|
2463
|
+
|
2464
|
+
Promise.prototype._isFinal = function () {
|
2465
|
+
return (this._bitField & 33554432) > 0;
|
2466
|
+
};
|
2467
|
+
|
2468
|
+
Promise.prototype._cancellable = function () {
|
2469
|
+
return (this._bitField & 67108864) > 0;
|
2470
|
+
};
|
2471
|
+
|
2472
|
+
Promise.prototype._setCancellable = function () {
|
2473
|
+
this._bitField = this._bitField | 67108864;
|
2474
|
+
};
|
2475
|
+
|
2476
|
+
Promise.prototype._unsetCancellable = function () {
|
2477
|
+
this._bitField = this._bitField & (~67108864);
|
2478
|
+
};
|
2479
|
+
|
2480
|
+
Promise.prototype._setIsMigrated = function () {
|
2481
|
+
this._bitField = this._bitField | 4194304;
|
2482
|
+
};
|
2483
|
+
|
2484
|
+
Promise.prototype._unsetIsMigrated = function () {
|
2485
|
+
this._bitField = this._bitField & (~4194304);
|
2486
|
+
};
|
2487
|
+
|
2488
|
+
Promise.prototype._isMigrated = function () {
|
2489
|
+
return (this._bitField & 4194304) > 0;
|
2490
|
+
};
|
2491
|
+
|
2492
|
+
Promise.prototype._receiverAt = function (index) {
|
2493
|
+
var ret = index === 0
|
2494
|
+
? this._receiver0
|
2495
|
+
: this[
|
2496
|
+
index * 5 - 5 + 4];
|
2497
|
+
if (ret === undefined && this._isBound()) {
|
2498
|
+
return this._boundValue();
|
2499
|
+
}
|
2500
|
+
return ret;
|
2501
|
+
};
|
2502
|
+
|
2503
|
+
Promise.prototype._promiseAt = function (index) {
|
2504
|
+
return index === 0
|
2505
|
+
? this._promise0
|
2506
|
+
: this[index * 5 - 5 + 3];
|
2507
|
+
};
|
2508
|
+
|
2509
|
+
Promise.prototype._fulfillmentHandlerAt = function (index) {
|
2510
|
+
return index === 0
|
2511
|
+
? this._fulfillmentHandler0
|
2512
|
+
: this[index * 5 - 5 + 0];
|
2513
|
+
};
|
2514
|
+
|
2515
|
+
Promise.prototype._rejectionHandlerAt = function (index) {
|
2516
|
+
return index === 0
|
2517
|
+
? this._rejectionHandler0
|
2518
|
+
: this[index * 5 - 5 + 1];
|
2519
|
+
};
|
2520
|
+
|
2521
|
+
Promise.prototype._boundValue = function() {
|
2522
|
+
var ret = this._boundTo;
|
2523
|
+
if (ret !== undefined) {
|
2524
|
+
if (ret instanceof Promise) {
|
2525
|
+
if (ret.isFulfilled()) {
|
2526
|
+
return ret.value();
|
2527
|
+
} else {
|
2528
|
+
return undefined;
|
2529
|
+
}
|
2530
|
+
}
|
2531
|
+
}
|
2532
|
+
return ret;
|
2533
|
+
};
|
2534
|
+
|
2535
|
+
Promise.prototype._migrateCallbacks = function (follower, index) {
|
2536
|
+
var fulfill = follower._fulfillmentHandlerAt(index);
|
2537
|
+
var reject = follower._rejectionHandlerAt(index);
|
2538
|
+
var progress = follower._progressHandlerAt(index);
|
2539
|
+
var promise = follower._promiseAt(index);
|
2540
|
+
var receiver = follower._receiverAt(index);
|
2541
|
+
if (promise instanceof Promise) promise._setIsMigrated();
|
2542
|
+
this._addCallbacks(fulfill, reject, progress, promise, receiver, null);
|
2543
|
+
};
|
2544
|
+
|
2545
|
+
Promise.prototype._addCallbacks = function (
|
2546
|
+
fulfill,
|
2547
|
+
reject,
|
2548
|
+
progress,
|
2549
|
+
promise,
|
2550
|
+
receiver,
|
2551
|
+
domain
|
2552
|
+
) {
|
2553
|
+
var index = this._length();
|
2554
|
+
|
2555
|
+
if (index >= 131071 - 5) {
|
2556
|
+
index = 0;
|
2557
|
+
this._setLength(0);
|
2558
|
+
}
|
2559
|
+
|
2560
|
+
if (index === 0) {
|
2561
|
+
this._promise0 = promise;
|
2562
|
+
if (receiver !== undefined) this._receiver0 = receiver;
|
2563
|
+
if (typeof fulfill === "function" && !this._isCarryingStackTrace()) {
|
2564
|
+
this._fulfillmentHandler0 =
|
2565
|
+
domain === null ? fulfill : domain.bind(fulfill);
|
2566
|
+
}
|
2567
|
+
if (typeof reject === "function") {
|
2568
|
+
this._rejectionHandler0 =
|
2569
|
+
domain === null ? reject : domain.bind(reject);
|
2570
|
+
}
|
2571
|
+
if (typeof progress === "function") {
|
2572
|
+
this._progressHandler0 =
|
2573
|
+
domain === null ? progress : domain.bind(progress);
|
2574
|
+
}
|
2575
|
+
} else {
|
2576
|
+
var base = index * 5 - 5;
|
2577
|
+
this[base + 3] = promise;
|
2578
|
+
this[base + 4] = receiver;
|
2579
|
+
if (typeof fulfill === "function") {
|
2580
|
+
this[base + 0] =
|
2581
|
+
domain === null ? fulfill : domain.bind(fulfill);
|
2582
|
+
}
|
2583
|
+
if (typeof reject === "function") {
|
2584
|
+
this[base + 1] =
|
2585
|
+
domain === null ? reject : domain.bind(reject);
|
2586
|
+
}
|
2587
|
+
if (typeof progress === "function") {
|
2588
|
+
this[base + 2] =
|
2589
|
+
domain === null ? progress : domain.bind(progress);
|
2590
|
+
}
|
2591
|
+
}
|
2592
|
+
this._setLength(index + 1);
|
2593
|
+
return index;
|
2594
|
+
};
|
2595
|
+
|
2596
|
+
Promise.prototype._setProxyHandlers = function (receiver, promiseSlotValue) {
|
2597
|
+
var index = this._length();
|
2598
|
+
|
2599
|
+
if (index >= 131071 - 5) {
|
2600
|
+
index = 0;
|
2601
|
+
this._setLength(0);
|
2602
|
+
}
|
2603
|
+
if (index === 0) {
|
2604
|
+
this._promise0 = promiseSlotValue;
|
2605
|
+
this._receiver0 = receiver;
|
2606
|
+
} else {
|
2607
|
+
var base = index * 5 - 5;
|
2608
|
+
this[base + 3] = promiseSlotValue;
|
2609
|
+
this[base + 4] = receiver;
|
2610
|
+
}
|
2611
|
+
this._setLength(index + 1);
|
2612
|
+
};
|
2613
|
+
|
2614
|
+
Promise.prototype._proxyPromiseArray = function (promiseArray, index) {
|
2615
|
+
this._setProxyHandlers(promiseArray, index);
|
2616
|
+
};
|
2617
|
+
|
2618
|
+
Promise.prototype._resolveCallback = function(value, shouldBind) {
|
2619
|
+
if (this._isFollowingOrFulfilledOrRejected()) return;
|
2620
|
+
if (value === this)
|
2621
|
+
return this._rejectCallback(makeSelfResolutionError(), false, true);
|
2622
|
+
var maybePromise = tryConvertToPromise(value, this);
|
2623
|
+
if (!(maybePromise instanceof Promise)) return this._fulfill(value);
|
2624
|
+
|
2625
|
+
var propagationFlags = 1 | (shouldBind ? 4 : 0);
|
2626
|
+
this._propagateFrom(maybePromise, propagationFlags);
|
2627
|
+
var promise = maybePromise._target();
|
2628
|
+
if (promise._isPending()) {
|
2629
|
+
var len = this._length();
|
2630
|
+
for (var i = 0; i < len; ++i) {
|
2631
|
+
promise._migrateCallbacks(this, i);
|
2632
|
+
}
|
2633
|
+
this._setFollowing();
|
2634
|
+
this._setLength(0);
|
2635
|
+
this._setFollowee(promise);
|
2636
|
+
} else if (promise._isFulfilled()) {
|
2637
|
+
this._fulfillUnchecked(promise._value());
|
2638
|
+
} else {
|
2639
|
+
this._rejectUnchecked(promise._reason(),
|
2640
|
+
promise._getCarriedStackTrace());
|
2641
|
+
}
|
2642
|
+
};
|
2643
|
+
|
2644
|
+
Promise.prototype._rejectCallback =
|
2645
|
+
function(reason, synchronous, shouldNotMarkOriginatingFromRejection) {
|
2646
|
+
if (!shouldNotMarkOriginatingFromRejection) {
|
2647
|
+
util.markAsOriginatingFromRejection(reason);
|
2648
|
+
}
|
2649
|
+
var trace = util.ensureErrorObject(reason);
|
2650
|
+
var hasStack = trace === reason;
|
2651
|
+
this._attachExtraTrace(trace, synchronous ? hasStack : false);
|
2652
|
+
this._reject(reason, hasStack ? undefined : trace);
|
2653
|
+
};
|
2654
|
+
|
2655
|
+
Promise.prototype._resolveFromResolver = function (resolver) {
|
2656
|
+
var promise = this;
|
2657
|
+
this._captureStackTrace();
|
2658
|
+
this._pushContext();
|
2659
|
+
var synchronous = true;
|
2660
|
+
var r = tryCatch(resolver)(function(value) {
|
2661
|
+
if (promise === null) return;
|
2662
|
+
promise._resolveCallback(value);
|
2663
|
+
promise = null;
|
2664
|
+
}, function (reason) {
|
2665
|
+
if (promise === null) return;
|
2666
|
+
promise._rejectCallback(reason, synchronous);
|
2667
|
+
promise = null;
|
2668
|
+
});
|
2669
|
+
synchronous = false;
|
2670
|
+
this._popContext();
|
2671
|
+
|
2672
|
+
if (r !== undefined && r === errorObj && promise !== null) {
|
2673
|
+
promise._rejectCallback(r.e, true, true);
|
2674
|
+
promise = null;
|
2675
|
+
}
|
2676
|
+
};
|
2677
|
+
|
2678
|
+
Promise.prototype._settlePromiseFromHandler = function (
|
2679
|
+
handler, receiver, value, promise
|
2680
|
+
) {
|
2681
|
+
if (promise._isRejected()) return;
|
2682
|
+
promise._pushContext();
|
2683
|
+
var x;
|
2684
|
+
if (receiver === APPLY && !this._isRejected()) {
|
2685
|
+
x = tryCatch(handler).apply(this._boundValue(), value);
|
2686
|
+
} else {
|
2687
|
+
x = tryCatch(handler).call(receiver, value);
|
2688
|
+
}
|
2689
|
+
promise._popContext();
|
2690
|
+
|
2691
|
+
if (x === errorObj || x === promise || x === NEXT_FILTER) {
|
2692
|
+
var err = x === promise ? makeSelfResolutionError() : x.e;
|
2693
|
+
promise._rejectCallback(err, false, true);
|
2694
|
+
} else {
|
2695
|
+
promise._resolveCallback(x);
|
2696
|
+
}
|
2697
|
+
};
|
2698
|
+
|
2699
|
+
Promise.prototype._target = function() {
|
2700
|
+
var ret = this;
|
2701
|
+
while (ret._isFollowing()) ret = ret._followee();
|
2702
|
+
return ret;
|
2703
|
+
};
|
2704
|
+
|
2705
|
+
Promise.prototype._followee = function() {
|
2706
|
+
return this._rejectionHandler0;
|
2707
|
+
};
|
2708
|
+
|
2709
|
+
Promise.prototype._setFollowee = function(promise) {
|
2710
|
+
this._rejectionHandler0 = promise;
|
2711
|
+
};
|
2712
|
+
|
2713
|
+
Promise.prototype._cleanValues = function () {
|
2714
|
+
if (this._cancellable()) {
|
2715
|
+
this._cancellationParent = undefined;
|
2716
|
+
}
|
2717
|
+
};
|
2718
|
+
|
2719
|
+
Promise.prototype._propagateFrom = function (parent, flags) {
|
2720
|
+
if ((flags & 1) > 0 && parent._cancellable()) {
|
2721
|
+
this._setCancellable();
|
2722
|
+
this._cancellationParent = parent;
|
2723
|
+
}
|
2724
|
+
if ((flags & 4) > 0 && parent._isBound()) {
|
2725
|
+
this._setBoundTo(parent._boundTo);
|
2726
|
+
}
|
2727
|
+
};
|
2728
|
+
|
2729
|
+
Promise.prototype._fulfill = function (value) {
|
2730
|
+
if (this._isFollowingOrFulfilledOrRejected()) return;
|
2731
|
+
this._fulfillUnchecked(value);
|
2732
|
+
};
|
2733
|
+
|
2734
|
+
Promise.prototype._reject = function (reason, carriedStackTrace) {
|
2735
|
+
if (this._isFollowingOrFulfilledOrRejected()) return;
|
2736
|
+
this._rejectUnchecked(reason, carriedStackTrace);
|
2737
|
+
};
|
2738
|
+
|
2739
|
+
Promise.prototype._settlePromiseAt = function (index) {
|
2740
|
+
var promise = this._promiseAt(index);
|
2741
|
+
var isPromise = promise instanceof Promise;
|
2742
|
+
|
2743
|
+
if (isPromise && promise._isMigrated()) {
|
2744
|
+
promise._unsetIsMigrated();
|
2745
|
+
return async.invoke(this._settlePromiseAt, this, index);
|
2746
|
+
}
|
2747
|
+
var handler = this._isFulfilled()
|
2748
|
+
? this._fulfillmentHandlerAt(index)
|
2749
|
+
: this._rejectionHandlerAt(index);
|
2750
|
+
|
2751
|
+
var carriedStackTrace =
|
2752
|
+
this._isCarryingStackTrace() ? this._getCarriedStackTrace() : undefined;
|
2753
|
+
var value = this._settledValue;
|
2754
|
+
var receiver = this._receiverAt(index);
|
2755
|
+
this._clearCallbackDataAtIndex(index);
|
2756
|
+
|
2757
|
+
if (typeof handler === "function") {
|
2758
|
+
if (!isPromise) {
|
2759
|
+
handler.call(receiver, value, promise);
|
2760
|
+
} else {
|
2761
|
+
this._settlePromiseFromHandler(handler, receiver, value, promise);
|
2762
|
+
}
|
2763
|
+
} else if (receiver instanceof PromiseArray) {
|
2764
|
+
if (!receiver._isResolved()) {
|
2765
|
+
if (this._isFulfilled()) {
|
2766
|
+
receiver._promiseFulfilled(value, promise);
|
2767
|
+
}
|
2768
|
+
else {
|
2769
|
+
receiver._promiseRejected(value, promise);
|
2770
|
+
}
|
2771
|
+
}
|
2772
|
+
} else if (isPromise) {
|
2773
|
+
if (this._isFulfilled()) {
|
2774
|
+
promise._fulfill(value);
|
2775
|
+
} else {
|
2776
|
+
promise._reject(value, carriedStackTrace);
|
2777
|
+
}
|
2778
|
+
}
|
2779
|
+
|
2780
|
+
if (index >= 4 && (index & 31) === 4)
|
2781
|
+
async.invokeLater(this._setLength, this, 0);
|
2782
|
+
};
|
2783
|
+
|
2784
|
+
Promise.prototype._clearCallbackDataAtIndex = function(index) {
|
2785
|
+
if (index === 0) {
|
2786
|
+
if (!this._isCarryingStackTrace()) {
|
2787
|
+
this._fulfillmentHandler0 = undefined;
|
2788
|
+
}
|
2789
|
+
this._rejectionHandler0 =
|
2790
|
+
this._progressHandler0 =
|
2791
|
+
this._receiver0 =
|
2792
|
+
this._promise0 = undefined;
|
2793
|
+
} else {
|
2794
|
+
var base = index * 5 - 5;
|
2795
|
+
this[base + 3] =
|
2796
|
+
this[base + 4] =
|
2797
|
+
this[base + 0] =
|
2798
|
+
this[base + 1] =
|
2799
|
+
this[base + 2] = undefined;
|
2800
|
+
}
|
2801
|
+
};
|
2802
|
+
|
2803
|
+
Promise.prototype._isSettlePromisesQueued = function () {
|
2804
|
+
return (this._bitField &
|
2805
|
+
-1073741824) === -1073741824;
|
2806
|
+
};
|
2807
|
+
|
2808
|
+
Promise.prototype._setSettlePromisesQueued = function () {
|
2809
|
+
this._bitField = this._bitField | -1073741824;
|
2810
|
+
};
|
2811
|
+
|
2812
|
+
Promise.prototype._unsetSettlePromisesQueued = function () {
|
2813
|
+
this._bitField = this._bitField & (~-1073741824);
|
2814
|
+
};
|
2815
|
+
|
2816
|
+
Promise.prototype._queueSettlePromises = function() {
|
2817
|
+
async.settlePromises(this);
|
2818
|
+
this._setSettlePromisesQueued();
|
2819
|
+
};
|
2820
|
+
|
2821
|
+
Promise.prototype._fulfillUnchecked = function (value) {
|
2822
|
+
if (value === this) {
|
2823
|
+
var err = makeSelfResolutionError();
|
2824
|
+
this._attachExtraTrace(err);
|
2825
|
+
return this._rejectUnchecked(err, undefined);
|
2826
|
+
}
|
2827
|
+
this._setFulfilled();
|
2828
|
+
this._settledValue = value;
|
2829
|
+
this._cleanValues();
|
2830
|
+
|
2831
|
+
if (this._length() > 0) {
|
2832
|
+
this._queueSettlePromises();
|
2833
|
+
}
|
2834
|
+
};
|
2835
|
+
|
2836
|
+
Promise.prototype._rejectUncheckedCheckError = function (reason) {
|
2837
|
+
var trace = util.ensureErrorObject(reason);
|
2838
|
+
this._rejectUnchecked(reason, trace === reason ? undefined : trace);
|
2839
|
+
};
|
2840
|
+
|
2841
|
+
Promise.prototype._rejectUnchecked = function (reason, trace) {
|
2842
|
+
if (reason === this) {
|
2843
|
+
var err = makeSelfResolutionError();
|
2844
|
+
this._attachExtraTrace(err);
|
2845
|
+
return this._rejectUnchecked(err);
|
2846
|
+
}
|
2847
|
+
this._setRejected();
|
2848
|
+
this._settledValue = reason;
|
2849
|
+
this._cleanValues();
|
2850
|
+
|
2851
|
+
if (this._isFinal()) {
|
2852
|
+
async.throwLater(function(e) {
|
2853
|
+
if ("stack" in e) {
|
2854
|
+
async.invokeFirst(
|
2855
|
+
CapturedTrace.unhandledRejection, undefined, e);
|
2856
|
+
}
|
2857
|
+
throw e;
|
2858
|
+
}, trace === undefined ? reason : trace);
|
2859
|
+
return;
|
2860
|
+
}
|
2861
|
+
|
2862
|
+
if (trace !== undefined && trace !== reason) {
|
2863
|
+
this._setCarriedStackTrace(trace);
|
2864
|
+
}
|
2865
|
+
|
2866
|
+
if (this._length() > 0) {
|
2867
|
+
this._queueSettlePromises();
|
2868
|
+
} else {
|
2869
|
+
this._ensurePossibleRejectionHandled();
|
2870
|
+
}
|
2871
|
+
};
|
2872
|
+
|
2873
|
+
Promise.prototype._settlePromises = function () {
|
2874
|
+
this._unsetSettlePromisesQueued();
|
2875
|
+
var len = this._length();
|
2876
|
+
for (var i = 0; i < len; i++) {
|
2877
|
+
this._settlePromiseAt(i);
|
2878
|
+
}
|
2879
|
+
};
|
2880
|
+
|
2881
|
+
util.notEnumerableProp(Promise,
|
2882
|
+
"_makeSelfResolutionError",
|
2883
|
+
makeSelfResolutionError);
|
2884
|
+
|
2885
|
+
_dereq_("./progress.js")(Promise, PromiseArray);
|
2886
|
+
_dereq_("./method.js")(Promise, INTERNAL, tryConvertToPromise, apiRejection);
|
2887
|
+
_dereq_("./bind.js")(Promise, INTERNAL, tryConvertToPromise);
|
2888
|
+
_dereq_("./finally.js")(Promise, NEXT_FILTER, tryConvertToPromise);
|
2889
|
+
_dereq_("./direct_resolve.js")(Promise);
|
2890
|
+
_dereq_("./synchronous_inspection.js")(Promise);
|
2891
|
+
_dereq_("./join.js")(Promise, PromiseArray, tryConvertToPromise, INTERNAL);
|
2892
|
+
Promise.Promise = Promise;
|
2893
|
+
_dereq_('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL);
|
2894
|
+
_dereq_('./cancel.js')(Promise);
|
2895
|
+
_dereq_('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext);
|
2896
|
+
_dereq_('./generators.js')(Promise, apiRejection, INTERNAL, tryConvertToPromise);
|
2897
|
+
_dereq_('./nodeify.js')(Promise);
|
2898
|
+
_dereq_('./call_get.js')(Promise);
|
2899
|
+
_dereq_('./props.js')(Promise, PromiseArray, tryConvertToPromise, apiRejection);
|
2900
|
+
_dereq_('./race.js')(Promise, INTERNAL, tryConvertToPromise, apiRejection);
|
2901
|
+
_dereq_('./reduce.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL);
|
2902
|
+
_dereq_('./settle.js')(Promise, PromiseArray);
|
2903
|
+
_dereq_('./some.js')(Promise, PromiseArray, apiRejection);
|
2904
|
+
_dereq_('./promisify.js')(Promise, INTERNAL);
|
2905
|
+
_dereq_('./any.js')(Promise);
|
2906
|
+
_dereq_('./each.js')(Promise, INTERNAL);
|
2907
|
+
_dereq_('./timers.js')(Promise, INTERNAL);
|
2908
|
+
_dereq_('./filter.js')(Promise, INTERNAL);
|
2909
|
+
|
2910
|
+
util.toFastProperties(Promise);
|
2911
|
+
util.toFastProperties(Promise.prototype);
|
2912
|
+
function fillTypes(value) {
|
2913
|
+
var p = new Promise(INTERNAL);
|
2914
|
+
p._fulfillmentHandler0 = value;
|
2915
|
+
p._rejectionHandler0 = value;
|
2916
|
+
p._progressHandler0 = value;
|
2917
|
+
p._promise0 = value;
|
2918
|
+
p._receiver0 = value;
|
2919
|
+
p._settledValue = value;
|
2920
|
+
}
|
2921
|
+
// Complete slack tracking, opt out of field-type tracking and
|
2922
|
+
// stabilize map
|
2923
|
+
fillTypes({a: 1});
|
2924
|
+
fillTypes({b: 2});
|
2925
|
+
fillTypes({c: 3});
|
2926
|
+
fillTypes(1);
|
2927
|
+
fillTypes(function(){});
|
2928
|
+
fillTypes(undefined);
|
2929
|
+
fillTypes(false);
|
2930
|
+
fillTypes(new Promise(INTERNAL));
|
2931
|
+
CapturedTrace.setBounds(async.firstLineError, util.lastLineError);
|
2932
|
+
return Promise;
|
2933
|
+
|
2934
|
+
};
|
2935
|
+
|
2936
|
+
},{"./any.js":1,"./async.js":2,"./bind.js":3,"./call_get.js":5,"./cancel.js":6,"./captured_trace.js":7,"./catch_filter.js":8,"./context.js":9,"./debuggability.js":10,"./direct_resolve.js":11,"./each.js":12,"./errors.js":13,"./filter.js":15,"./finally.js":16,"./generators.js":17,"./join.js":18,"./map.js":19,"./method.js":20,"./nodeify.js":21,"./progress.js":22,"./promise_array.js":24,"./promise_resolver.js":25,"./promisify.js":26,"./props.js":27,"./race.js":29,"./reduce.js":30,"./settle.js":32,"./some.js":33,"./synchronous_inspection.js":34,"./thenables.js":35,"./timers.js":36,"./using.js":37,"./util.js":38}],24:[function(_dereq_,module,exports){
|
2937
|
+
"use strict";
|
2938
|
+
module.exports = function(Promise, INTERNAL, tryConvertToPromise,
|
2939
|
+
apiRejection) {
|
2940
|
+
var util = _dereq_("./util.js");
|
2941
|
+
var isArray = util.isArray;
|
2942
|
+
|
2943
|
+
function toResolutionValue(val) {
|
2944
|
+
switch(val) {
|
2945
|
+
case -2: return [];
|
2946
|
+
case -3: return {};
|
2947
|
+
}
|
2948
|
+
}
|
2949
|
+
|
2950
|
+
function PromiseArray(values) {
|
2951
|
+
var promise = this._promise = new Promise(INTERNAL);
|
2952
|
+
var parent;
|
2953
|
+
if (values instanceof Promise) {
|
2954
|
+
parent = values;
|
2955
|
+
promise._propagateFrom(parent, 1 | 4);
|
2956
|
+
}
|
2957
|
+
this._values = values;
|
2958
|
+
this._length = 0;
|
2959
|
+
this._totalResolved = 0;
|
2960
|
+
this._init(undefined, -2);
|
2961
|
+
}
|
2962
|
+
PromiseArray.prototype.length = function () {
|
2963
|
+
return this._length;
|
2964
|
+
};
|
2965
|
+
|
2966
|
+
PromiseArray.prototype.promise = function () {
|
2967
|
+
return this._promise;
|
2968
|
+
};
|
2969
|
+
|
2970
|
+
PromiseArray.prototype._init = function init(_, resolveValueIfEmpty) {
|
2971
|
+
var values = tryConvertToPromise(this._values, this._promise);
|
2972
|
+
if (values instanceof Promise) {
|
2973
|
+
values = values._target();
|
2974
|
+
this._values = values;
|
2975
|
+
if (values._isFulfilled()) {
|
2976
|
+
values = values._value();
|
2977
|
+
if (!isArray(values)) {
|
2978
|
+
var err = new Promise.TypeError("expecting an array, a promise or a thenable\u000a\u000a See http://goo.gl/s8MMhc\u000a");
|
2979
|
+
this.__hardReject__(err);
|
2980
|
+
return;
|
2981
|
+
}
|
2982
|
+
} else if (values._isPending()) {
|
2983
|
+
values._then(
|
2984
|
+
init,
|
2985
|
+
this._reject,
|
2986
|
+
undefined,
|
2987
|
+
this,
|
2988
|
+
resolveValueIfEmpty
|
2989
|
+
);
|
2990
|
+
return;
|
2991
|
+
} else {
|
2992
|
+
this._reject(values._reason());
|
2993
|
+
return;
|
2994
|
+
}
|
2995
|
+
} else if (!isArray(values)) {
|
2996
|
+
this._promise._reject(apiRejection("expecting an array, a promise or a thenable\u000a\u000a See http://goo.gl/s8MMhc\u000a")._reason());
|
2997
|
+
return;
|
2998
|
+
}
|
2999
|
+
|
3000
|
+
if (values.length === 0) {
|
3001
|
+
if (resolveValueIfEmpty === -5) {
|
3002
|
+
this._resolveEmptyArray();
|
3003
|
+
}
|
3004
|
+
else {
|
3005
|
+
this._resolve(toResolutionValue(resolveValueIfEmpty));
|
3006
|
+
}
|
3007
|
+
return;
|
3008
|
+
}
|
3009
|
+
var len = this.getActualLength(values.length);
|
3010
|
+
this._length = len;
|
3011
|
+
this._values = this.shouldCopyValues() ? new Array(len) : this._values;
|
3012
|
+
var promise = this._promise;
|
3013
|
+
for (var i = 0; i < len; ++i) {
|
3014
|
+
var isResolved = this._isResolved();
|
3015
|
+
var maybePromise = tryConvertToPromise(values[i], promise);
|
3016
|
+
if (maybePromise instanceof Promise) {
|
3017
|
+
maybePromise = maybePromise._target();
|
3018
|
+
if (isResolved) {
|
3019
|
+
maybePromise._ignoreRejections();
|
3020
|
+
} else if (maybePromise._isPending()) {
|
3021
|
+
maybePromise._proxyPromiseArray(this, i);
|
3022
|
+
} else if (maybePromise._isFulfilled()) {
|
3023
|
+
this._promiseFulfilled(maybePromise._value(), i);
|
3024
|
+
} else {
|
3025
|
+
this._promiseRejected(maybePromise._reason(), i);
|
3026
|
+
}
|
3027
|
+
} else if (!isResolved) {
|
3028
|
+
this._promiseFulfilled(maybePromise, i);
|
3029
|
+
}
|
3030
|
+
}
|
3031
|
+
};
|
3032
|
+
|
3033
|
+
PromiseArray.prototype._isResolved = function () {
|
3034
|
+
return this._values === null;
|
3035
|
+
};
|
3036
|
+
|
3037
|
+
PromiseArray.prototype._resolve = function (value) {
|
3038
|
+
this._values = null;
|
3039
|
+
this._promise._fulfill(value);
|
3040
|
+
};
|
3041
|
+
|
3042
|
+
PromiseArray.prototype.__hardReject__ =
|
3043
|
+
PromiseArray.prototype._reject = function (reason) {
|
3044
|
+
this._values = null;
|
3045
|
+
this._promise._rejectCallback(reason, false, true);
|
3046
|
+
};
|
3047
|
+
|
3048
|
+
PromiseArray.prototype._promiseProgressed = function (progressValue, index) {
|
3049
|
+
this._promise._progress({
|
3050
|
+
index: index,
|
3051
|
+
value: progressValue
|
3052
|
+
});
|
3053
|
+
};
|
3054
|
+
|
3055
|
+
|
3056
|
+
PromiseArray.prototype._promiseFulfilled = function (value, index) {
|
3057
|
+
this._values[index] = value;
|
3058
|
+
var totalResolved = ++this._totalResolved;
|
3059
|
+
if (totalResolved >= this._length) {
|
3060
|
+
this._resolve(this._values);
|
3061
|
+
}
|
3062
|
+
};
|
3063
|
+
|
3064
|
+
PromiseArray.prototype._promiseRejected = function (reason, index) {
|
3065
|
+
this._totalResolved++;
|
3066
|
+
this._reject(reason);
|
3067
|
+
};
|
3068
|
+
|
3069
|
+
PromiseArray.prototype.shouldCopyValues = function () {
|
3070
|
+
return true;
|
3071
|
+
};
|
3072
|
+
|
3073
|
+
PromiseArray.prototype.getActualLength = function (len) {
|
3074
|
+
return len;
|
3075
|
+
};
|
3076
|
+
|
3077
|
+
return PromiseArray;
|
3078
|
+
};
|
3079
|
+
|
3080
|
+
},{"./util.js":38}],25:[function(_dereq_,module,exports){
|
3081
|
+
"use strict";
|
3082
|
+
var util = _dereq_("./util.js");
|
3083
|
+
var maybeWrapAsError = util.maybeWrapAsError;
|
3084
|
+
var errors = _dereq_("./errors.js");
|
3085
|
+
var TimeoutError = errors.TimeoutError;
|
3086
|
+
var OperationalError = errors.OperationalError;
|
3087
|
+
var haveGetters = util.haveGetters;
|
3088
|
+
var es5 = _dereq_("./es5.js");
|
3089
|
+
|
3090
|
+
function isUntypedError(obj) {
|
3091
|
+
return obj instanceof Error &&
|
3092
|
+
es5.getPrototypeOf(obj) === Error.prototype;
|
3093
|
+
}
|
3094
|
+
|
3095
|
+
var rErrorKey = /^(?:name|message|stack|cause)$/;
|
3096
|
+
function wrapAsOperationalError(obj) {
|
3097
|
+
var ret;
|
3098
|
+
if (isUntypedError(obj)) {
|
3099
|
+
ret = new OperationalError(obj);
|
3100
|
+
ret.name = obj.name;
|
3101
|
+
ret.message = obj.message;
|
3102
|
+
ret.stack = obj.stack;
|
3103
|
+
var keys = es5.keys(obj);
|
3104
|
+
for (var i = 0; i < keys.length; ++i) {
|
3105
|
+
var key = keys[i];
|
3106
|
+
if (!rErrorKey.test(key)) {
|
3107
|
+
ret[key] = obj[key];
|
3108
|
+
}
|
3109
|
+
}
|
3110
|
+
return ret;
|
3111
|
+
}
|
3112
|
+
util.markAsOriginatingFromRejection(obj);
|
3113
|
+
return obj;
|
3114
|
+
}
|
3115
|
+
|
3116
|
+
function nodebackForPromise(promise) {
|
3117
|
+
return function(err, value) {
|
3118
|
+
if (promise === null) return;
|
3119
|
+
|
3120
|
+
if (err) {
|
3121
|
+
var wrapped = wrapAsOperationalError(maybeWrapAsError(err));
|
3122
|
+
promise._attachExtraTrace(wrapped);
|
3123
|
+
promise._reject(wrapped);
|
3124
|
+
} else if (arguments.length > 2) {
|
3125
|
+
var $_len = arguments.length;var args = new Array($_len - 1); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];}
|
3126
|
+
promise._fulfill(args);
|
3127
|
+
} else {
|
3128
|
+
promise._fulfill(value);
|
3129
|
+
}
|
3130
|
+
|
3131
|
+
promise = null;
|
3132
|
+
};
|
3133
|
+
}
|
3134
|
+
|
3135
|
+
|
3136
|
+
var PromiseResolver;
|
3137
|
+
if (!haveGetters) {
|
3138
|
+
PromiseResolver = function (promise) {
|
3139
|
+
this.promise = promise;
|
3140
|
+
this.asCallback = nodebackForPromise(promise);
|
3141
|
+
this.callback = this.asCallback;
|
3142
|
+
};
|
3143
|
+
}
|
3144
|
+
else {
|
3145
|
+
PromiseResolver = function (promise) {
|
3146
|
+
this.promise = promise;
|
3147
|
+
};
|
3148
|
+
}
|
3149
|
+
if (haveGetters) {
|
3150
|
+
var prop = {
|
3151
|
+
get: function() {
|
3152
|
+
return nodebackForPromise(this.promise);
|
3153
|
+
}
|
3154
|
+
};
|
3155
|
+
es5.defineProperty(PromiseResolver.prototype, "asCallback", prop);
|
3156
|
+
es5.defineProperty(PromiseResolver.prototype, "callback", prop);
|
3157
|
+
}
|
3158
|
+
|
3159
|
+
PromiseResolver._nodebackForPromise = nodebackForPromise;
|
3160
|
+
|
3161
|
+
PromiseResolver.prototype.toString = function () {
|
3162
|
+
return "[object PromiseResolver]";
|
3163
|
+
};
|
3164
|
+
|
3165
|
+
PromiseResolver.prototype.resolve =
|
3166
|
+
PromiseResolver.prototype.fulfill = function (value) {
|
3167
|
+
if (!(this instanceof PromiseResolver)) {
|
3168
|
+
throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\u000a\u000a See http://goo.gl/sdkXL9\u000a");
|
3169
|
+
}
|
3170
|
+
this.promise._resolveCallback(value);
|
3171
|
+
};
|
3172
|
+
|
3173
|
+
PromiseResolver.prototype.reject = function (reason) {
|
3174
|
+
if (!(this instanceof PromiseResolver)) {
|
3175
|
+
throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\u000a\u000a See http://goo.gl/sdkXL9\u000a");
|
3176
|
+
}
|
3177
|
+
this.promise._rejectCallback(reason);
|
3178
|
+
};
|
3179
|
+
|
3180
|
+
PromiseResolver.prototype.progress = function (value) {
|
3181
|
+
if (!(this instanceof PromiseResolver)) {
|
3182
|
+
throw new TypeError("Illegal invocation, resolver resolve/reject must be called within a resolver context. Consider using the promise constructor instead.\u000a\u000a See http://goo.gl/sdkXL9\u000a");
|
3183
|
+
}
|
3184
|
+
this.promise._progress(value);
|
3185
|
+
};
|
3186
|
+
|
3187
|
+
PromiseResolver.prototype.cancel = function (err) {
|
3188
|
+
this.promise.cancel(err);
|
3189
|
+
};
|
3190
|
+
|
3191
|
+
PromiseResolver.prototype.timeout = function () {
|
3192
|
+
this.reject(new TimeoutError("timeout"));
|
3193
|
+
};
|
3194
|
+
|
3195
|
+
PromiseResolver.prototype.isResolved = function () {
|
3196
|
+
return this.promise.isResolved();
|
3197
|
+
};
|
3198
|
+
|
3199
|
+
PromiseResolver.prototype.toJSON = function () {
|
3200
|
+
return this.promise.toJSON();
|
3201
|
+
};
|
3202
|
+
|
3203
|
+
module.exports = PromiseResolver;
|
3204
|
+
|
3205
|
+
},{"./errors.js":13,"./es5.js":14,"./util.js":38}],26:[function(_dereq_,module,exports){
|
3206
|
+
"use strict";
|
3207
|
+
module.exports = function(Promise, INTERNAL) {
|
3208
|
+
var THIS = {};
|
3209
|
+
var util = _dereq_("./util.js");
|
3210
|
+
var nodebackForPromise = _dereq_("./promise_resolver.js")
|
3211
|
+
._nodebackForPromise;
|
3212
|
+
var withAppended = util.withAppended;
|
3213
|
+
var maybeWrapAsError = util.maybeWrapAsError;
|
3214
|
+
var canEvaluate = util.canEvaluate;
|
3215
|
+
var TypeError = _dereq_("./errors").TypeError;
|
3216
|
+
var defaultSuffix = "Async";
|
3217
|
+
var defaultPromisified = {__isPromisified__: true};
|
3218
|
+
var noCopyProps = [
|
3219
|
+
"arity", "length",
|
3220
|
+
"name",
|
3221
|
+
"arguments",
|
3222
|
+
"caller",
|
3223
|
+
"callee",
|
3224
|
+
"prototype",
|
3225
|
+
"__isPromisified__"
|
3226
|
+
];
|
3227
|
+
var noCopyPropsPattern = new RegExp("^(?:" + noCopyProps.join("|") + ")$");
|
3228
|
+
|
3229
|
+
var defaultFilter = function(name) {
|
3230
|
+
return util.isIdentifier(name) &&
|
3231
|
+
name.charAt(0) !== "_" &&
|
3232
|
+
name !== "constructor";
|
3233
|
+
};
|
3234
|
+
|
3235
|
+
function propsFilter(key) {
|
3236
|
+
return !noCopyPropsPattern.test(key);
|
3237
|
+
}
|
3238
|
+
|
3239
|
+
function isPromisified(fn) {
|
3240
|
+
try {
|
3241
|
+
return fn.__isPromisified__ === true;
|
3242
|
+
}
|
3243
|
+
catch (e) {
|
3244
|
+
return false;
|
3245
|
+
}
|
3246
|
+
}
|
3247
|
+
|
3248
|
+
function hasPromisified(obj, key, suffix) {
|
3249
|
+
var val = util.getDataPropertyOrDefault(obj, key + suffix,
|
3250
|
+
defaultPromisified);
|
3251
|
+
return val ? isPromisified(val) : false;
|
3252
|
+
}
|
3253
|
+
function checkValid(ret, suffix, suffixRegexp) {
|
3254
|
+
for (var i = 0; i < ret.length; i += 2) {
|
3255
|
+
var key = ret[i];
|
3256
|
+
if (suffixRegexp.test(key)) {
|
3257
|
+
var keyWithoutAsyncSuffix = key.replace(suffixRegexp, "");
|
3258
|
+
for (var j = 0; j < ret.length; j += 2) {
|
3259
|
+
if (ret[j] === keyWithoutAsyncSuffix) {
|
3260
|
+
throw new TypeError("Cannot promisify an API that has normal methods with '%s'-suffix\u000a\u000a See http://goo.gl/iWrZbw\u000a"
|
3261
|
+
.replace("%s", suffix));
|
3262
|
+
}
|
3263
|
+
}
|
3264
|
+
}
|
3265
|
+
}
|
3266
|
+
}
|
3267
|
+
|
3268
|
+
function promisifiableMethods(obj, suffix, suffixRegexp, filter) {
|
3269
|
+
var keys = util.inheritedDataKeys(obj);
|
3270
|
+
var ret = [];
|
3271
|
+
for (var i = 0; i < keys.length; ++i) {
|
3272
|
+
var key = keys[i];
|
3273
|
+
var value = obj[key];
|
3274
|
+
var passesDefaultFilter = filter === defaultFilter
|
3275
|
+
? true : defaultFilter(key, value, obj);
|
3276
|
+
if (typeof value === "function" &&
|
3277
|
+
!isPromisified(value) &&
|
3278
|
+
!hasPromisified(obj, key, suffix) &&
|
3279
|
+
filter(key, value, obj, passesDefaultFilter)) {
|
3280
|
+
ret.push(key, value);
|
3281
|
+
}
|
3282
|
+
}
|
3283
|
+
checkValid(ret, suffix, suffixRegexp);
|
3284
|
+
return ret;
|
3285
|
+
}
|
3286
|
+
|
3287
|
+
var escapeIdentRegex = function(str) {
|
3288
|
+
return str.replace(/([$])/, "\\$");
|
3289
|
+
};
|
3290
|
+
|
3291
|
+
var makeNodePromisifiedEval;
|
3292
|
+
if (!true) {
|
3293
|
+
var switchCaseArgumentOrder = function(likelyArgumentCount) {
|
3294
|
+
var ret = [likelyArgumentCount];
|
3295
|
+
var min = Math.max(0, likelyArgumentCount - 1 - 3);
|
3296
|
+
for(var i = likelyArgumentCount - 1; i >= min; --i) {
|
3297
|
+
ret.push(i);
|
3298
|
+
}
|
3299
|
+
for(var i = likelyArgumentCount + 1; i <= 3; ++i) {
|
3300
|
+
ret.push(i);
|
3301
|
+
}
|
3302
|
+
return ret;
|
3303
|
+
};
|
3304
|
+
|
3305
|
+
var argumentSequence = function(argumentCount) {
|
3306
|
+
return util.filledRange(argumentCount, "_arg", "");
|
3307
|
+
};
|
3308
|
+
|
3309
|
+
var parameterDeclaration = function(parameterCount) {
|
3310
|
+
return util.filledRange(
|
3311
|
+
Math.max(parameterCount, 3), "_arg", "");
|
3312
|
+
};
|
3313
|
+
|
3314
|
+
var parameterCount = function(fn) {
|
3315
|
+
if (typeof fn.length === "number") {
|
3316
|
+
return Math.max(Math.min(fn.length, 1023 + 1), 0);
|
3317
|
+
}
|
3318
|
+
return 0;
|
3319
|
+
};
|
3320
|
+
|
3321
|
+
makeNodePromisifiedEval =
|
3322
|
+
function(callback, receiver, originalName, fn) {
|
3323
|
+
var newParameterCount = Math.max(0, parameterCount(fn) - 1);
|
3324
|
+
var argumentOrder = switchCaseArgumentOrder(newParameterCount);
|
3325
|
+
var shouldProxyThis = typeof callback === "string" || receiver === THIS;
|
3326
|
+
|
3327
|
+
function generateCallForArgumentCount(count) {
|
3328
|
+
var args = argumentSequence(count).join(", ");
|
3329
|
+
var comma = count > 0 ? ", " : "";
|
3330
|
+
var ret;
|
3331
|
+
if (shouldProxyThis) {
|
3332
|
+
ret = "ret = callback.call(this, {{args}}, nodeback); break;\n";
|
3333
|
+
} else {
|
3334
|
+
ret = receiver === undefined
|
3335
|
+
? "ret = callback({{args}}, nodeback); break;\n"
|
3336
|
+
: "ret = callback.call(receiver, {{args}}, nodeback); break;\n";
|
3337
|
+
}
|
3338
|
+
return ret.replace("{{args}}", args).replace(", ", comma);
|
3339
|
+
}
|
3340
|
+
|
3341
|
+
function generateArgumentSwitchCase() {
|
3342
|
+
var ret = "";
|
3343
|
+
for (var i = 0; i < argumentOrder.length; ++i) {
|
3344
|
+
ret += "case " + argumentOrder[i] +":" +
|
3345
|
+
generateCallForArgumentCount(argumentOrder[i]);
|
3346
|
+
}
|
3347
|
+
|
3348
|
+
ret += " \n\
|
3349
|
+
default: \n\
|
3350
|
+
var args = new Array(len + 1); \n\
|
3351
|
+
var i = 0; \n\
|
3352
|
+
for (var i = 0; i < len; ++i) { \n\
|
3353
|
+
args[i] = arguments[i]; \n\
|
3354
|
+
} \n\
|
3355
|
+
args[i] = nodeback; \n\
|
3356
|
+
[CodeForCall] \n\
|
3357
|
+
break; \n\
|
3358
|
+
".replace("[CodeForCall]", (shouldProxyThis
|
3359
|
+
? "ret = callback.apply(this, args);\n"
|
3360
|
+
: "ret = callback.apply(receiver, args);\n"));
|
3361
|
+
return ret;
|
3362
|
+
}
|
3363
|
+
|
3364
|
+
var getFunctionCode = typeof callback === "string"
|
3365
|
+
? ("this != null ? this['"+callback+"'] : fn")
|
3366
|
+
: "fn";
|
3367
|
+
|
3368
|
+
return new Function("Promise",
|
3369
|
+
"fn",
|
3370
|
+
"receiver",
|
3371
|
+
"withAppended",
|
3372
|
+
"maybeWrapAsError",
|
3373
|
+
"nodebackForPromise",
|
3374
|
+
"tryCatch",
|
3375
|
+
"errorObj",
|
3376
|
+
"notEnumerableProp",
|
3377
|
+
"INTERNAL","'use strict'; \n\
|
3378
|
+
var ret = function (Parameters) { \n\
|
3379
|
+
'use strict'; \n\
|
3380
|
+
var len = arguments.length; \n\
|
3381
|
+
var promise = new Promise(INTERNAL); \n\
|
3382
|
+
promise._captureStackTrace(); \n\
|
3383
|
+
var nodeback = nodebackForPromise(promise); \n\
|
3384
|
+
var ret; \n\
|
3385
|
+
var callback = tryCatch([GetFunctionCode]); \n\
|
3386
|
+
switch(len) { \n\
|
3387
|
+
[CodeForSwitchCase] \n\
|
3388
|
+
} \n\
|
3389
|
+
if (ret === errorObj) { \n\
|
3390
|
+
promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n\
|
3391
|
+
} \n\
|
3392
|
+
return promise; \n\
|
3393
|
+
}; \n\
|
3394
|
+
notEnumerableProp(ret, '__isPromisified__', true); \n\
|
3395
|
+
return ret; \n\
|
3396
|
+
"
|
3397
|
+
.replace("Parameters", parameterDeclaration(newParameterCount))
|
3398
|
+
.replace("[CodeForSwitchCase]", generateArgumentSwitchCase())
|
3399
|
+
.replace("[GetFunctionCode]", getFunctionCode))(
|
3400
|
+
Promise,
|
3401
|
+
fn,
|
3402
|
+
receiver,
|
3403
|
+
withAppended,
|
3404
|
+
maybeWrapAsError,
|
3405
|
+
nodebackForPromise,
|
3406
|
+
util.tryCatch,
|
3407
|
+
util.errorObj,
|
3408
|
+
util.notEnumerableProp,
|
3409
|
+
INTERNAL
|
3410
|
+
);
|
3411
|
+
};
|
3412
|
+
}
|
3413
|
+
|
3414
|
+
function makeNodePromisifiedClosure(callback, receiver, _, fn) {
|
3415
|
+
var defaultThis = (function() {return this;})();
|
3416
|
+
var method = callback;
|
3417
|
+
if (typeof method === "string") {
|
3418
|
+
callback = fn;
|
3419
|
+
}
|
3420
|
+
function promisified() {
|
3421
|
+
var _receiver = receiver;
|
3422
|
+
if (receiver === THIS) _receiver = this;
|
3423
|
+
var promise = new Promise(INTERNAL);
|
3424
|
+
promise._captureStackTrace();
|
3425
|
+
var cb = typeof method === "string" && this !== defaultThis
|
3426
|
+
? this[method] : callback;
|
3427
|
+
var fn = nodebackForPromise(promise);
|
3428
|
+
try {
|
3429
|
+
cb.apply(_receiver, withAppended(arguments, fn));
|
3430
|
+
} catch(e) {
|
3431
|
+
promise._rejectCallback(maybeWrapAsError(e), true, true);
|
3432
|
+
}
|
3433
|
+
return promise;
|
3434
|
+
}
|
3435
|
+
util.notEnumerableProp(promisified, "__isPromisified__", true);
|
3436
|
+
return promisified;
|
3437
|
+
}
|
3438
|
+
|
3439
|
+
var makeNodePromisified = canEvaluate
|
3440
|
+
? makeNodePromisifiedEval
|
3441
|
+
: makeNodePromisifiedClosure;
|
3442
|
+
|
3443
|
+
function promisifyAll(obj, suffix, filter, promisifier) {
|
3444
|
+
var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + "$");
|
3445
|
+
var methods =
|
3446
|
+
promisifiableMethods(obj, suffix, suffixRegexp, filter);
|
3447
|
+
|
3448
|
+
for (var i = 0, len = methods.length; i < len; i+= 2) {
|
3449
|
+
var key = methods[i];
|
3450
|
+
var fn = methods[i+1];
|
3451
|
+
var promisifiedKey = key + suffix;
|
3452
|
+
obj[promisifiedKey] = promisifier === makeNodePromisified
|
3453
|
+
? makeNodePromisified(key, THIS, key, fn, suffix)
|
3454
|
+
: promisifier(fn, function() {
|
3455
|
+
return makeNodePromisified(key, THIS, key, fn, suffix);
|
3456
|
+
});
|
3457
|
+
}
|
3458
|
+
util.toFastProperties(obj);
|
3459
|
+
return obj;
|
3460
|
+
}
|
3461
|
+
|
3462
|
+
function promisify(callback, receiver) {
|
3463
|
+
return makeNodePromisified(callback, receiver, undefined, callback);
|
3464
|
+
}
|
3465
|
+
|
3466
|
+
Promise.promisify = function (fn, receiver) {
|
3467
|
+
if (typeof fn !== "function") {
|
3468
|
+
throw new TypeError("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
|
3469
|
+
}
|
3470
|
+
if (isPromisified(fn)) {
|
3471
|
+
return fn;
|
3472
|
+
}
|
3473
|
+
var ret = promisify(fn, arguments.length < 2 ? THIS : receiver);
|
3474
|
+
util.copyDescriptors(fn, ret, propsFilter);
|
3475
|
+
return ret;
|
3476
|
+
};
|
3477
|
+
|
3478
|
+
Promise.promisifyAll = function (target, options) {
|
3479
|
+
if (typeof target !== "function" && typeof target !== "object") {
|
3480
|
+
throw new TypeError("the target of promisifyAll must be an object or a function\u000a\u000a See http://goo.gl/9ITlV0\u000a");
|
3481
|
+
}
|
3482
|
+
options = Object(options);
|
3483
|
+
var suffix = options.suffix;
|
3484
|
+
if (typeof suffix !== "string") suffix = defaultSuffix;
|
3485
|
+
var filter = options.filter;
|
3486
|
+
if (typeof filter !== "function") filter = defaultFilter;
|
3487
|
+
var promisifier = options.promisifier;
|
3488
|
+
if (typeof promisifier !== "function") promisifier = makeNodePromisified;
|
3489
|
+
|
3490
|
+
if (!util.isIdentifier(suffix)) {
|
3491
|
+
throw new RangeError("suffix must be a valid identifier\u000a\u000a See http://goo.gl/8FZo5V\u000a");
|
3492
|
+
}
|
3493
|
+
|
3494
|
+
var keys = util.inheritedDataKeys(target);
|
3495
|
+
for (var i = 0; i < keys.length; ++i) {
|
3496
|
+
var value = target[keys[i]];
|
3497
|
+
if (keys[i] !== "constructor" &&
|
3498
|
+
util.isClass(value)) {
|
3499
|
+
promisifyAll(value.prototype, suffix, filter, promisifier);
|
3500
|
+
promisifyAll(value, suffix, filter, promisifier);
|
3501
|
+
}
|
3502
|
+
}
|
3503
|
+
|
3504
|
+
return promisifyAll(target, suffix, filter, promisifier);
|
3505
|
+
};
|
3506
|
+
};
|
3507
|
+
|
3508
|
+
|
3509
|
+
},{"./errors":13,"./promise_resolver.js":25,"./util.js":38}],27:[function(_dereq_,module,exports){
|
3510
|
+
"use strict";
|
3511
|
+
module.exports = function(
|
3512
|
+
Promise, PromiseArray, tryConvertToPromise, apiRejection) {
|
3513
|
+
var util = _dereq_("./util.js");
|
3514
|
+
var isObject = util.isObject;
|
3515
|
+
var es5 = _dereq_("./es5.js");
|
3516
|
+
|
3517
|
+
function PropertiesPromiseArray(obj) {
|
3518
|
+
var keys = es5.keys(obj);
|
3519
|
+
var len = keys.length;
|
3520
|
+
var values = new Array(len * 2);
|
3521
|
+
for (var i = 0; i < len; ++i) {
|
3522
|
+
var key = keys[i];
|
3523
|
+
values[i] = obj[key];
|
3524
|
+
values[i + len] = key;
|
3525
|
+
}
|
3526
|
+
this.constructor$(values);
|
3527
|
+
}
|
3528
|
+
util.inherits(PropertiesPromiseArray, PromiseArray);
|
3529
|
+
|
3530
|
+
PropertiesPromiseArray.prototype._init = function () {
|
3531
|
+
this._init$(undefined, -3) ;
|
3532
|
+
};
|
3533
|
+
|
3534
|
+
PropertiesPromiseArray.prototype._promiseFulfilled = function (value, index) {
|
3535
|
+
this._values[index] = value;
|
3536
|
+
var totalResolved = ++this._totalResolved;
|
3537
|
+
if (totalResolved >= this._length) {
|
3538
|
+
var val = {};
|
3539
|
+
var keyOffset = this.length();
|
3540
|
+
for (var i = 0, len = this.length(); i < len; ++i) {
|
3541
|
+
val[this._values[i + keyOffset]] = this._values[i];
|
3542
|
+
}
|
3543
|
+
this._resolve(val);
|
3544
|
+
}
|
3545
|
+
};
|
3546
|
+
|
3547
|
+
PropertiesPromiseArray.prototype._promiseProgressed = function (value, index) {
|
3548
|
+
this._promise._progress({
|
3549
|
+
key: this._values[index + this.length()],
|
3550
|
+
value: value
|
3551
|
+
});
|
3552
|
+
};
|
3553
|
+
|
3554
|
+
PropertiesPromiseArray.prototype.shouldCopyValues = function () {
|
3555
|
+
return false;
|
3556
|
+
};
|
3557
|
+
|
3558
|
+
PropertiesPromiseArray.prototype.getActualLength = function (len) {
|
3559
|
+
return len >> 1;
|
3560
|
+
};
|
3561
|
+
|
3562
|
+
function props(promises) {
|
3563
|
+
var ret;
|
3564
|
+
var castValue = tryConvertToPromise(promises);
|
3565
|
+
|
3566
|
+
if (!isObject(castValue)) {
|
3567
|
+
return apiRejection("cannot await properties of a non-object\u000a\u000a See http://goo.gl/OsFKC8\u000a");
|
3568
|
+
} else if (castValue instanceof Promise) {
|
3569
|
+
ret = castValue._then(
|
3570
|
+
Promise.props, undefined, undefined, undefined, undefined);
|
3571
|
+
} else {
|
3572
|
+
ret = new PropertiesPromiseArray(castValue).promise();
|
3573
|
+
}
|
3574
|
+
|
3575
|
+
if (castValue instanceof Promise) {
|
3576
|
+
ret._propagateFrom(castValue, 4);
|
3577
|
+
}
|
3578
|
+
return ret;
|
3579
|
+
}
|
3580
|
+
|
3581
|
+
Promise.prototype.props = function () {
|
3582
|
+
return props(this);
|
3583
|
+
};
|
3584
|
+
|
3585
|
+
Promise.props = function (promises) {
|
3586
|
+
return props(promises);
|
3587
|
+
};
|
3588
|
+
};
|
3589
|
+
|
3590
|
+
},{"./es5.js":14,"./util.js":38}],28:[function(_dereq_,module,exports){
|
3591
|
+
"use strict";
|
3592
|
+
function arrayMove(src, srcIndex, dst, dstIndex, len) {
|
3593
|
+
for (var j = 0; j < len; ++j) {
|
3594
|
+
dst[j + dstIndex] = src[j + srcIndex];
|
3595
|
+
src[j + srcIndex] = void 0;
|
3596
|
+
}
|
3597
|
+
}
|
3598
|
+
|
3599
|
+
function Queue(capacity) {
|
3600
|
+
this._capacity = capacity;
|
3601
|
+
this._length = 0;
|
3602
|
+
this._front = 0;
|
3603
|
+
}
|
3604
|
+
|
3605
|
+
Queue.prototype._willBeOverCapacity = function (size) {
|
3606
|
+
return this._capacity < size;
|
3607
|
+
};
|
3608
|
+
|
3609
|
+
Queue.prototype._pushOne = function (arg) {
|
3610
|
+
var length = this.length();
|
3611
|
+
this._checkCapacity(length + 1);
|
3612
|
+
var i = (this._front + length) & (this._capacity - 1);
|
3613
|
+
this[i] = arg;
|
3614
|
+
this._length = length + 1;
|
3615
|
+
};
|
3616
|
+
|
3617
|
+
Queue.prototype._unshiftOne = function(value) {
|
3618
|
+
var capacity = this._capacity;
|
3619
|
+
this._checkCapacity(this.length() + 1);
|
3620
|
+
var front = this._front;
|
3621
|
+
var i = (((( front - 1 ) &
|
3622
|
+
( capacity - 1) ) ^ capacity ) - capacity );
|
3623
|
+
this[i] = value;
|
3624
|
+
this._front = i;
|
3625
|
+
this._length = this.length() + 1;
|
3626
|
+
};
|
3627
|
+
|
3628
|
+
Queue.prototype.unshift = function(fn, receiver, arg) {
|
3629
|
+
this._unshiftOne(arg);
|
3630
|
+
this._unshiftOne(receiver);
|
3631
|
+
this._unshiftOne(fn);
|
3632
|
+
};
|
3633
|
+
|
3634
|
+
Queue.prototype.push = function (fn, receiver, arg) {
|
3635
|
+
var length = this.length() + 3;
|
3636
|
+
if (this._willBeOverCapacity(length)) {
|
3637
|
+
this._pushOne(fn);
|
3638
|
+
this._pushOne(receiver);
|
3639
|
+
this._pushOne(arg);
|
3640
|
+
return;
|
3641
|
+
}
|
3642
|
+
var j = this._front + length - 3;
|
3643
|
+
this._checkCapacity(length);
|
3644
|
+
var wrapMask = this._capacity - 1;
|
3645
|
+
this[(j + 0) & wrapMask] = fn;
|
3646
|
+
this[(j + 1) & wrapMask] = receiver;
|
3647
|
+
this[(j + 2) & wrapMask] = arg;
|
3648
|
+
this._length = length;
|
3649
|
+
};
|
3650
|
+
|
3651
|
+
Queue.prototype.shift = function () {
|
3652
|
+
var front = this._front,
|
3653
|
+
ret = this[front];
|
3654
|
+
|
3655
|
+
this[front] = undefined;
|
3656
|
+
this._front = (front + 1) & (this._capacity - 1);
|
3657
|
+
this._length--;
|
3658
|
+
return ret;
|
3659
|
+
};
|
3660
|
+
|
3661
|
+
Queue.prototype.length = function () {
|
3662
|
+
return this._length;
|
3663
|
+
};
|
3664
|
+
|
3665
|
+
Queue.prototype._checkCapacity = function (size) {
|
3666
|
+
if (this._capacity < size) {
|
3667
|
+
this._resizeTo(this._capacity << 1);
|
3668
|
+
}
|
3669
|
+
};
|
3670
|
+
|
3671
|
+
Queue.prototype._resizeTo = function (capacity) {
|
3672
|
+
var oldCapacity = this._capacity;
|
3673
|
+
this._capacity = capacity;
|
3674
|
+
var front = this._front;
|
3675
|
+
var length = this._length;
|
3676
|
+
var moveItemsCount = (front + length) & (oldCapacity - 1);
|
3677
|
+
arrayMove(this, 0, this, oldCapacity, moveItemsCount);
|
3678
|
+
};
|
3679
|
+
|
3680
|
+
module.exports = Queue;
|
3681
|
+
|
3682
|
+
},{}],29:[function(_dereq_,module,exports){
|
3683
|
+
"use strict";
|
3684
|
+
module.exports = function(
|
3685
|
+
Promise, INTERNAL, tryConvertToPromise, apiRejection) {
|
3686
|
+
var isArray = _dereq_("./util.js").isArray;
|
3687
|
+
|
3688
|
+
var raceLater = function (promise) {
|
3689
|
+
return promise.then(function(array) {
|
3690
|
+
return race(array, promise);
|
3691
|
+
});
|
3692
|
+
};
|
3693
|
+
|
3694
|
+
function race(promises, parent) {
|
3695
|
+
var maybePromise = tryConvertToPromise(promises);
|
3696
|
+
|
3697
|
+
if (maybePromise instanceof Promise) {
|
3698
|
+
return raceLater(maybePromise);
|
3699
|
+
} else if (!isArray(promises)) {
|
3700
|
+
return apiRejection("expecting an array, a promise or a thenable\u000a\u000a See http://goo.gl/s8MMhc\u000a");
|
3701
|
+
}
|
3702
|
+
|
3703
|
+
var ret = new Promise(INTERNAL);
|
3704
|
+
if (parent !== undefined) {
|
3705
|
+
ret._propagateFrom(parent, 4 | 1);
|
3706
|
+
}
|
3707
|
+
var fulfill = ret._fulfill;
|
3708
|
+
var reject = ret._reject;
|
3709
|
+
for (var i = 0, len = promises.length; i < len; ++i) {
|
3710
|
+
var val = promises[i];
|
3711
|
+
|
3712
|
+
if (val === undefined && !(i in promises)) {
|
3713
|
+
continue;
|
3714
|
+
}
|
3715
|
+
|
3716
|
+
Promise.cast(val)._then(fulfill, reject, undefined, ret, null);
|
3717
|
+
}
|
3718
|
+
return ret;
|
3719
|
+
}
|
3720
|
+
|
3721
|
+
Promise.race = function (promises) {
|
3722
|
+
return race(promises, undefined);
|
3723
|
+
};
|
3724
|
+
|
3725
|
+
Promise.prototype.race = function () {
|
3726
|
+
return race(this, undefined);
|
3727
|
+
};
|
3728
|
+
|
3729
|
+
};
|
3730
|
+
|
3731
|
+
},{"./util.js":38}],30:[function(_dereq_,module,exports){
|
3732
|
+
"use strict";
|
3733
|
+
module.exports = function(Promise,
|
3734
|
+
PromiseArray,
|
3735
|
+
apiRejection,
|
3736
|
+
tryConvertToPromise,
|
3737
|
+
INTERNAL) {
|
3738
|
+
var getDomain = Promise._getDomain;
|
3739
|
+
var async = _dereq_("./async.js");
|
3740
|
+
var util = _dereq_("./util.js");
|
3741
|
+
var tryCatch = util.tryCatch;
|
3742
|
+
var errorObj = util.errorObj;
|
3743
|
+
function ReductionPromiseArray(promises, fn, accum, _each) {
|
3744
|
+
this.constructor$(promises);
|
3745
|
+
this._promise._captureStackTrace();
|
3746
|
+
this._preservedValues = _each === INTERNAL ? [] : null;
|
3747
|
+
this._zerothIsAccum = (accum === undefined);
|
3748
|
+
this._gotAccum = false;
|
3749
|
+
this._reducingIndex = (this._zerothIsAccum ? 1 : 0);
|
3750
|
+
this._valuesPhase = undefined;
|
3751
|
+
var maybePromise = tryConvertToPromise(accum, this._promise);
|
3752
|
+
var rejected = false;
|
3753
|
+
var isPromise = maybePromise instanceof Promise;
|
3754
|
+
if (isPromise) {
|
3755
|
+
maybePromise = maybePromise._target();
|
3756
|
+
if (maybePromise._isPending()) {
|
3757
|
+
maybePromise._proxyPromiseArray(this, -1);
|
3758
|
+
} else if (maybePromise._isFulfilled()) {
|
3759
|
+
accum = maybePromise._value();
|
3760
|
+
this._gotAccum = true;
|
3761
|
+
} else {
|
3762
|
+
this._reject(maybePromise._reason());
|
3763
|
+
rejected = true;
|
3764
|
+
}
|
3765
|
+
}
|
3766
|
+
if (!(isPromise || this._zerothIsAccum)) this._gotAccum = true;
|
3767
|
+
var domain = getDomain();
|
3768
|
+
this._callback = domain === null ? fn : domain.bind(fn);
|
3769
|
+
this._accum = accum;
|
3770
|
+
if (!rejected) async.invoke(init, this, undefined);
|
3771
|
+
}
|
3772
|
+
function init() {
|
3773
|
+
this._init$(undefined, -5);
|
3774
|
+
}
|
3775
|
+
util.inherits(ReductionPromiseArray, PromiseArray);
|
3776
|
+
|
3777
|
+
ReductionPromiseArray.prototype._init = function () {};
|
3778
|
+
|
3779
|
+
ReductionPromiseArray.prototype._resolveEmptyArray = function () {
|
3780
|
+
if (this._gotAccum || this._zerothIsAccum) {
|
3781
|
+
this._resolve(this._preservedValues !== null
|
3782
|
+
? [] : this._accum);
|
3783
|
+
}
|
3784
|
+
};
|
3785
|
+
|
3786
|
+
ReductionPromiseArray.prototype._promiseFulfilled = function (value, index) {
|
3787
|
+
var values = this._values;
|
3788
|
+
values[index] = value;
|
3789
|
+
var length = this.length();
|
3790
|
+
var preservedValues = this._preservedValues;
|
3791
|
+
var isEach = preservedValues !== null;
|
3792
|
+
var gotAccum = this._gotAccum;
|
3793
|
+
var valuesPhase = this._valuesPhase;
|
3794
|
+
var valuesPhaseIndex;
|
3795
|
+
if (!valuesPhase) {
|
3796
|
+
valuesPhase = this._valuesPhase = new Array(length);
|
3797
|
+
for (valuesPhaseIndex=0; valuesPhaseIndex<length; ++valuesPhaseIndex) {
|
3798
|
+
valuesPhase[valuesPhaseIndex] = 0;
|
3799
|
+
}
|
3800
|
+
}
|
3801
|
+
valuesPhaseIndex = valuesPhase[index];
|
3802
|
+
|
3803
|
+
if (index === 0 && this._zerothIsAccum) {
|
3804
|
+
this._accum = value;
|
3805
|
+
this._gotAccum = gotAccum = true;
|
3806
|
+
valuesPhase[index] = ((valuesPhaseIndex === 0)
|
3807
|
+
? 1 : 2);
|
3808
|
+
} else if (index === -1) {
|
3809
|
+
this._accum = value;
|
3810
|
+
this._gotAccum = gotAccum = true;
|
3811
|
+
} else {
|
3812
|
+
if (valuesPhaseIndex === 0) {
|
3813
|
+
valuesPhase[index] = 1;
|
3814
|
+
} else {
|
3815
|
+
valuesPhase[index] = 2;
|
3816
|
+
this._accum = value;
|
3817
|
+
}
|
3818
|
+
}
|
3819
|
+
if (!gotAccum) return;
|
3820
|
+
|
3821
|
+
var callback = this._callback;
|
3822
|
+
var receiver = this._promise._boundValue();
|
3823
|
+
var ret;
|
3824
|
+
|
3825
|
+
for (var i = this._reducingIndex; i < length; ++i) {
|
3826
|
+
valuesPhaseIndex = valuesPhase[i];
|
3827
|
+
if (valuesPhaseIndex === 2) {
|
3828
|
+
this._reducingIndex = i + 1;
|
3829
|
+
continue;
|
3830
|
+
}
|
3831
|
+
if (valuesPhaseIndex !== 1) return;
|
3832
|
+
value = values[i];
|
3833
|
+
this._promise._pushContext();
|
3834
|
+
if (isEach) {
|
3835
|
+
preservedValues.push(value);
|
3836
|
+
ret = tryCatch(callback).call(receiver, value, i, length);
|
3837
|
+
}
|
3838
|
+
else {
|
3839
|
+
ret = tryCatch(callback)
|
3840
|
+
.call(receiver, this._accum, value, i, length);
|
3841
|
+
}
|
3842
|
+
this._promise._popContext();
|
3843
|
+
|
3844
|
+
if (ret === errorObj) return this._reject(ret.e);
|
3845
|
+
|
3846
|
+
var maybePromise = tryConvertToPromise(ret, this._promise);
|
3847
|
+
if (maybePromise instanceof Promise) {
|
3848
|
+
maybePromise = maybePromise._target();
|
3849
|
+
if (maybePromise._isPending()) {
|
3850
|
+
valuesPhase[i] = 4;
|
3851
|
+
return maybePromise._proxyPromiseArray(this, i);
|
3852
|
+
} else if (maybePromise._isFulfilled()) {
|
3853
|
+
ret = maybePromise._value();
|
3854
|
+
} else {
|
3855
|
+
return this._reject(maybePromise._reason());
|
3856
|
+
}
|
3857
|
+
}
|
3858
|
+
|
3859
|
+
this._reducingIndex = i + 1;
|
3860
|
+
this._accum = ret;
|
3861
|
+
}
|
3862
|
+
|
3863
|
+
this._resolve(isEach ? preservedValues : this._accum);
|
3864
|
+
};
|
3865
|
+
|
3866
|
+
function reduce(promises, fn, initialValue, _each) {
|
3867
|
+
if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
|
3868
|
+
var array = new ReductionPromiseArray(promises, fn, initialValue, _each);
|
3869
|
+
return array.promise();
|
3870
|
+
}
|
3871
|
+
|
3872
|
+
Promise.prototype.reduce = function (fn, initialValue) {
|
3873
|
+
return reduce(this, fn, initialValue, null);
|
3874
|
+
};
|
3875
|
+
|
3876
|
+
Promise.reduce = function (promises, fn, initialValue, _each) {
|
3877
|
+
return reduce(promises, fn, initialValue, _each);
|
3878
|
+
};
|
3879
|
+
};
|
3880
|
+
|
3881
|
+
},{"./async.js":2,"./util.js":38}],31:[function(_dereq_,module,exports){
|
3882
|
+
"use strict";
|
3883
|
+
var schedule;
|
3884
|
+
var util = _dereq_("./util");
|
3885
|
+
var noAsyncScheduler = function() {
|
3886
|
+
throw new Error("No async scheduler available\u000a\u000a See http://goo.gl/m3OTXk\u000a");
|
3887
|
+
};
|
3888
|
+
if (util.isNode && typeof MutationObserver === "undefined") {
|
3889
|
+
var GlobalSetImmediate = global.setImmediate;
|
3890
|
+
var ProcessNextTick = process.nextTick;
|
3891
|
+
schedule = util.isRecentNode
|
3892
|
+
? function(fn) { GlobalSetImmediate.call(global, fn); }
|
3893
|
+
: function(fn) { ProcessNextTick.call(process, fn); };
|
3894
|
+
} else if ((typeof MutationObserver !== "undefined") &&
|
3895
|
+
!(typeof window !== "undefined" &&
|
3896
|
+
window.navigator &&
|
3897
|
+
window.navigator.standalone)) {
|
3898
|
+
schedule = function(fn) {
|
3899
|
+
var div = document.createElement("div");
|
3900
|
+
var observer = new MutationObserver(fn);
|
3901
|
+
observer.observe(div, {attributes: true});
|
3902
|
+
return function() { div.classList.toggle("foo"); };
|
3903
|
+
};
|
3904
|
+
schedule.isStatic = true;
|
3905
|
+
} else if (typeof setImmediate !== "undefined") {
|
3906
|
+
schedule = function (fn) {
|
3907
|
+
setImmediate(fn);
|
3908
|
+
};
|
3909
|
+
} else if (typeof setTimeout !== "undefined") {
|
3910
|
+
schedule = function (fn) {
|
3911
|
+
setTimeout(fn, 0);
|
3912
|
+
};
|
3913
|
+
} else {
|
3914
|
+
schedule = noAsyncScheduler;
|
3915
|
+
}
|
3916
|
+
module.exports = schedule;
|
3917
|
+
|
3918
|
+
},{"./util":38}],32:[function(_dereq_,module,exports){
|
3919
|
+
"use strict";
|
3920
|
+
module.exports =
|
3921
|
+
function(Promise, PromiseArray) {
|
3922
|
+
var PromiseInspection = Promise.PromiseInspection;
|
3923
|
+
var util = _dereq_("./util.js");
|
3924
|
+
|
3925
|
+
function SettledPromiseArray(values) {
|
3926
|
+
this.constructor$(values);
|
3927
|
+
}
|
3928
|
+
util.inherits(SettledPromiseArray, PromiseArray);
|
3929
|
+
|
3930
|
+
SettledPromiseArray.prototype._promiseResolved = function (index, inspection) {
|
3931
|
+
this._values[index] = inspection;
|
3932
|
+
var totalResolved = ++this._totalResolved;
|
3933
|
+
if (totalResolved >= this._length) {
|
3934
|
+
this._resolve(this._values);
|
3935
|
+
}
|
3936
|
+
};
|
3937
|
+
|
3938
|
+
SettledPromiseArray.prototype._promiseFulfilled = function (value, index) {
|
3939
|
+
var ret = new PromiseInspection();
|
3940
|
+
ret._bitField = 268435456;
|
3941
|
+
ret._settledValue = value;
|
3942
|
+
this._promiseResolved(index, ret);
|
3943
|
+
};
|
3944
|
+
SettledPromiseArray.prototype._promiseRejected = function (reason, index) {
|
3945
|
+
var ret = new PromiseInspection();
|
3946
|
+
ret._bitField = 134217728;
|
3947
|
+
ret._settledValue = reason;
|
3948
|
+
this._promiseResolved(index, ret);
|
3949
|
+
};
|
3950
|
+
|
3951
|
+
Promise.settle = function (promises) {
|
3952
|
+
return new SettledPromiseArray(promises).promise();
|
3953
|
+
};
|
3954
|
+
|
3955
|
+
Promise.prototype.settle = function () {
|
3956
|
+
return new SettledPromiseArray(this).promise();
|
3957
|
+
};
|
3958
|
+
};
|
3959
|
+
|
3960
|
+
},{"./util.js":38}],33:[function(_dereq_,module,exports){
|
3961
|
+
"use strict";
|
3962
|
+
module.exports =
|
3963
|
+
function(Promise, PromiseArray, apiRejection) {
|
3964
|
+
var util = _dereq_("./util.js");
|
3965
|
+
var RangeError = _dereq_("./errors.js").RangeError;
|
3966
|
+
var AggregateError = _dereq_("./errors.js").AggregateError;
|
3967
|
+
var isArray = util.isArray;
|
3968
|
+
|
3969
|
+
|
3970
|
+
function SomePromiseArray(values) {
|
3971
|
+
this.constructor$(values);
|
3972
|
+
this._howMany = 0;
|
3973
|
+
this._unwrap = false;
|
3974
|
+
this._initialized = false;
|
3975
|
+
}
|
3976
|
+
util.inherits(SomePromiseArray, PromiseArray);
|
3977
|
+
|
3978
|
+
SomePromiseArray.prototype._init = function () {
|
3979
|
+
if (!this._initialized) {
|
3980
|
+
return;
|
3981
|
+
}
|
3982
|
+
if (this._howMany === 0) {
|
3983
|
+
this._resolve([]);
|
3984
|
+
return;
|
3985
|
+
}
|
3986
|
+
this._init$(undefined, -5);
|
3987
|
+
var isArrayResolved = isArray(this._values);
|
3988
|
+
if (!this._isResolved() &&
|
3989
|
+
isArrayResolved &&
|
3990
|
+
this._howMany > this._canPossiblyFulfill()) {
|
3991
|
+
this._reject(this._getRangeError(this.length()));
|
3992
|
+
}
|
3993
|
+
};
|
3994
|
+
|
3995
|
+
SomePromiseArray.prototype.init = function () {
|
3996
|
+
this._initialized = true;
|
3997
|
+
this._init();
|
3998
|
+
};
|
3999
|
+
|
4000
|
+
SomePromiseArray.prototype.setUnwrap = function () {
|
4001
|
+
this._unwrap = true;
|
4002
|
+
};
|
4003
|
+
|
4004
|
+
SomePromiseArray.prototype.howMany = function () {
|
4005
|
+
return this._howMany;
|
4006
|
+
};
|
4007
|
+
|
4008
|
+
SomePromiseArray.prototype.setHowMany = function (count) {
|
4009
|
+
this._howMany = count;
|
4010
|
+
};
|
4011
|
+
|
4012
|
+
SomePromiseArray.prototype._promiseFulfilled = function (value) {
|
4013
|
+
this._addFulfilled(value);
|
4014
|
+
if (this._fulfilled() === this.howMany()) {
|
4015
|
+
this._values.length = this.howMany();
|
4016
|
+
if (this.howMany() === 1 && this._unwrap) {
|
4017
|
+
this._resolve(this._values[0]);
|
4018
|
+
} else {
|
4019
|
+
this._resolve(this._values);
|
4020
|
+
}
|
4021
|
+
}
|
4022
|
+
|
4023
|
+
};
|
4024
|
+
SomePromiseArray.prototype._promiseRejected = function (reason) {
|
4025
|
+
this._addRejected(reason);
|
4026
|
+
if (this.howMany() > this._canPossiblyFulfill()) {
|
4027
|
+
var e = new AggregateError();
|
4028
|
+
for (var i = this.length(); i < this._values.length; ++i) {
|
4029
|
+
e.push(this._values[i]);
|
4030
|
+
}
|
4031
|
+
this._reject(e);
|
4032
|
+
}
|
4033
|
+
};
|
4034
|
+
|
4035
|
+
SomePromiseArray.prototype._fulfilled = function () {
|
4036
|
+
return this._totalResolved;
|
4037
|
+
};
|
4038
|
+
|
4039
|
+
SomePromiseArray.prototype._rejected = function () {
|
4040
|
+
return this._values.length - this.length();
|
4041
|
+
};
|
4042
|
+
|
4043
|
+
SomePromiseArray.prototype._addRejected = function (reason) {
|
4044
|
+
this._values.push(reason);
|
4045
|
+
};
|
4046
|
+
|
4047
|
+
SomePromiseArray.prototype._addFulfilled = function (value) {
|
4048
|
+
this._values[this._totalResolved++] = value;
|
4049
|
+
};
|
4050
|
+
|
4051
|
+
SomePromiseArray.prototype._canPossiblyFulfill = function () {
|
4052
|
+
return this.length() - this._rejected();
|
4053
|
+
};
|
4054
|
+
|
4055
|
+
SomePromiseArray.prototype._getRangeError = function (count) {
|
4056
|
+
var message = "Input array must contain at least " +
|
4057
|
+
this._howMany + " items but contains only " + count + " items";
|
4058
|
+
return new RangeError(message);
|
4059
|
+
};
|
4060
|
+
|
4061
|
+
SomePromiseArray.prototype._resolveEmptyArray = function () {
|
4062
|
+
this._reject(this._getRangeError(0));
|
4063
|
+
};
|
4064
|
+
|
4065
|
+
function some(promises, howMany) {
|
4066
|
+
if ((howMany | 0) !== howMany || howMany < 0) {
|
4067
|
+
return apiRejection("expecting a positive integer\u000a\u000a See http://goo.gl/1wAmHx\u000a");
|
4068
|
+
}
|
4069
|
+
var ret = new SomePromiseArray(promises);
|
4070
|
+
var promise = ret.promise();
|
4071
|
+
ret.setHowMany(howMany);
|
4072
|
+
ret.init();
|
4073
|
+
return promise;
|
4074
|
+
}
|
4075
|
+
|
4076
|
+
Promise.some = function (promises, howMany) {
|
4077
|
+
return some(promises, howMany);
|
4078
|
+
};
|
4079
|
+
|
4080
|
+
Promise.prototype.some = function (howMany) {
|
4081
|
+
return some(this, howMany);
|
4082
|
+
};
|
4083
|
+
|
4084
|
+
Promise._SomePromiseArray = SomePromiseArray;
|
4085
|
+
};
|
4086
|
+
|
4087
|
+
},{"./errors.js":13,"./util.js":38}],34:[function(_dereq_,module,exports){
|
4088
|
+
"use strict";
|
4089
|
+
module.exports = function(Promise) {
|
4090
|
+
function PromiseInspection(promise) {
|
4091
|
+
if (promise !== undefined) {
|
4092
|
+
promise = promise._target();
|
4093
|
+
this._bitField = promise._bitField;
|
4094
|
+
this._settledValue = promise._settledValue;
|
4095
|
+
}
|
4096
|
+
else {
|
4097
|
+
this._bitField = 0;
|
4098
|
+
this._settledValue = undefined;
|
4099
|
+
}
|
4100
|
+
}
|
4101
|
+
|
4102
|
+
PromiseInspection.prototype.value = function () {
|
4103
|
+
if (!this.isFulfilled()) {
|
4104
|
+
throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/hc1DLj\u000a");
|
4105
|
+
}
|
4106
|
+
return this._settledValue;
|
4107
|
+
};
|
4108
|
+
|
4109
|
+
PromiseInspection.prototype.error =
|
4110
|
+
PromiseInspection.prototype.reason = function () {
|
4111
|
+
if (!this.isRejected()) {
|
4112
|
+
throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/hPuiwB\u000a");
|
4113
|
+
}
|
4114
|
+
return this._settledValue;
|
4115
|
+
};
|
4116
|
+
|
4117
|
+
PromiseInspection.prototype.isFulfilled =
|
4118
|
+
Promise.prototype._isFulfilled = function () {
|
4119
|
+
return (this._bitField & 268435456) > 0;
|
4120
|
+
};
|
4121
|
+
|
4122
|
+
PromiseInspection.prototype.isRejected =
|
4123
|
+
Promise.prototype._isRejected = function () {
|
4124
|
+
return (this._bitField & 134217728) > 0;
|
4125
|
+
};
|
4126
|
+
|
4127
|
+
PromiseInspection.prototype.isPending =
|
4128
|
+
Promise.prototype._isPending = function () {
|
4129
|
+
return (this._bitField & 402653184) === 0;
|
4130
|
+
};
|
4131
|
+
|
4132
|
+
PromiseInspection.prototype.isResolved =
|
4133
|
+
Promise.prototype._isResolved = function () {
|
4134
|
+
return (this._bitField & 402653184) > 0;
|
4135
|
+
};
|
4136
|
+
|
4137
|
+
Promise.prototype.isPending = function() {
|
4138
|
+
return this._target()._isPending();
|
4139
|
+
};
|
4140
|
+
|
4141
|
+
Promise.prototype.isRejected = function() {
|
4142
|
+
return this._target()._isRejected();
|
4143
|
+
};
|
4144
|
+
|
4145
|
+
Promise.prototype.isFulfilled = function() {
|
4146
|
+
return this._target()._isFulfilled();
|
4147
|
+
};
|
4148
|
+
|
4149
|
+
Promise.prototype.isResolved = function() {
|
4150
|
+
return this._target()._isResolved();
|
4151
|
+
};
|
4152
|
+
|
4153
|
+
Promise.prototype._value = function() {
|
4154
|
+
return this._settledValue;
|
4155
|
+
};
|
4156
|
+
|
4157
|
+
Promise.prototype._reason = function() {
|
4158
|
+
this._unsetRejectionIsUnhandled();
|
4159
|
+
return this._settledValue;
|
4160
|
+
};
|
4161
|
+
|
4162
|
+
Promise.prototype.value = function() {
|
4163
|
+
var target = this._target();
|
4164
|
+
if (!target.isFulfilled()) {
|
4165
|
+
throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\u000a\u000a See http://goo.gl/hc1DLj\u000a");
|
4166
|
+
}
|
4167
|
+
return target._settledValue;
|
4168
|
+
};
|
4169
|
+
|
4170
|
+
Promise.prototype.reason = function() {
|
4171
|
+
var target = this._target();
|
4172
|
+
if (!target.isRejected()) {
|
4173
|
+
throw new TypeError("cannot get rejection reason of a non-rejected promise\u000a\u000a See http://goo.gl/hPuiwB\u000a");
|
4174
|
+
}
|
4175
|
+
target._unsetRejectionIsUnhandled();
|
4176
|
+
return target._settledValue;
|
4177
|
+
};
|
4178
|
+
|
4179
|
+
|
4180
|
+
Promise.PromiseInspection = PromiseInspection;
|
4181
|
+
};
|
4182
|
+
|
4183
|
+
},{}],35:[function(_dereq_,module,exports){
|
4184
|
+
"use strict";
|
4185
|
+
module.exports = function(Promise, INTERNAL) {
|
4186
|
+
var util = _dereq_("./util.js");
|
4187
|
+
var errorObj = util.errorObj;
|
4188
|
+
var isObject = util.isObject;
|
4189
|
+
|
4190
|
+
function tryConvertToPromise(obj, context) {
|
4191
|
+
if (isObject(obj)) {
|
4192
|
+
if (obj instanceof Promise) {
|
4193
|
+
return obj;
|
4194
|
+
}
|
4195
|
+
else if (isAnyBluebirdPromise(obj)) {
|
4196
|
+
var ret = new Promise(INTERNAL);
|
4197
|
+
obj._then(
|
4198
|
+
ret._fulfillUnchecked,
|
4199
|
+
ret._rejectUncheckedCheckError,
|
4200
|
+
ret._progressUnchecked,
|
4201
|
+
ret,
|
4202
|
+
null
|
4203
|
+
);
|
4204
|
+
return ret;
|
4205
|
+
}
|
4206
|
+
var then = util.tryCatch(getThen)(obj);
|
4207
|
+
if (then === errorObj) {
|
4208
|
+
if (context) context._pushContext();
|
4209
|
+
var ret = Promise.reject(then.e);
|
4210
|
+
if (context) context._popContext();
|
4211
|
+
return ret;
|
4212
|
+
} else if (typeof then === "function") {
|
4213
|
+
return doThenable(obj, then, context);
|
4214
|
+
}
|
4215
|
+
}
|
4216
|
+
return obj;
|
4217
|
+
}
|
4218
|
+
|
4219
|
+
function getThen(obj) {
|
4220
|
+
return obj.then;
|
4221
|
+
}
|
4222
|
+
|
4223
|
+
var hasProp = {}.hasOwnProperty;
|
4224
|
+
function isAnyBluebirdPromise(obj) {
|
4225
|
+
return hasProp.call(obj, "_promise0");
|
4226
|
+
}
|
4227
|
+
|
4228
|
+
function doThenable(x, then, context) {
|
4229
|
+
var promise = new Promise(INTERNAL);
|
4230
|
+
var ret = promise;
|
4231
|
+
if (context) context._pushContext();
|
4232
|
+
promise._captureStackTrace();
|
4233
|
+
if (context) context._popContext();
|
4234
|
+
var synchronous = true;
|
4235
|
+
var result = util.tryCatch(then).call(x,
|
4236
|
+
resolveFromThenable,
|
4237
|
+
rejectFromThenable,
|
4238
|
+
progressFromThenable);
|
4239
|
+
synchronous = false;
|
4240
|
+
if (promise && result === errorObj) {
|
4241
|
+
promise._rejectCallback(result.e, true, true);
|
4242
|
+
promise = null;
|
4243
|
+
}
|
4244
|
+
|
4245
|
+
function resolveFromThenable(value) {
|
4246
|
+
if (!promise) return;
|
4247
|
+
promise._resolveCallback(value);
|
4248
|
+
promise = null;
|
4249
|
+
}
|
4250
|
+
|
4251
|
+
function rejectFromThenable(reason) {
|
4252
|
+
if (!promise) return;
|
4253
|
+
promise._rejectCallback(reason, synchronous, true);
|
4254
|
+
promise = null;
|
4255
|
+
}
|
4256
|
+
|
4257
|
+
function progressFromThenable(value) {
|
4258
|
+
if (!promise) return;
|
4259
|
+
if (typeof promise._progress === "function") {
|
4260
|
+
promise._progress(value);
|
4261
|
+
}
|
4262
|
+
}
|
4263
|
+
return ret;
|
4264
|
+
}
|
4265
|
+
|
4266
|
+
return tryConvertToPromise;
|
4267
|
+
};
|
4268
|
+
|
4269
|
+
},{"./util.js":38}],36:[function(_dereq_,module,exports){
|
4270
|
+
"use strict";
|
4271
|
+
module.exports = function(Promise, INTERNAL) {
|
4272
|
+
var util = _dereq_("./util.js");
|
4273
|
+
var TimeoutError = Promise.TimeoutError;
|
4274
|
+
|
4275
|
+
var afterTimeout = function (promise, message) {
|
4276
|
+
if (!promise.isPending()) return;
|
4277
|
+
if (typeof message !== "string") {
|
4278
|
+
message = "operation timed out";
|
4279
|
+
}
|
4280
|
+
var err = new TimeoutError(message);
|
4281
|
+
util.markAsOriginatingFromRejection(err);
|
4282
|
+
promise._attachExtraTrace(err);
|
4283
|
+
promise._cancel(err);
|
4284
|
+
};
|
4285
|
+
|
4286
|
+
var afterValue = function(value) { return delay(+this).thenReturn(value); };
|
4287
|
+
var delay = Promise.delay = function (value, ms) {
|
4288
|
+
if (ms === undefined) {
|
4289
|
+
ms = value;
|
4290
|
+
value = undefined;
|
4291
|
+
var ret = new Promise(INTERNAL);
|
4292
|
+
setTimeout(function() { ret._fulfill(); }, ms);
|
4293
|
+
return ret;
|
4294
|
+
}
|
4295
|
+
ms = +ms;
|
4296
|
+
return Promise.resolve(value)._then(afterValue, null, null, ms, undefined);
|
4297
|
+
};
|
4298
|
+
|
4299
|
+
Promise.prototype.delay = function (ms) {
|
4300
|
+
return delay(this, ms);
|
4301
|
+
};
|
4302
|
+
|
4303
|
+
function successClear(value) {
|
4304
|
+
var handle = this;
|
4305
|
+
if (handle instanceof Number) handle = +handle;
|
4306
|
+
clearTimeout(handle);
|
4307
|
+
return value;
|
4308
|
+
}
|
4309
|
+
|
4310
|
+
function failureClear(reason) {
|
4311
|
+
var handle = this;
|
4312
|
+
if (handle instanceof Number) handle = +handle;
|
4313
|
+
clearTimeout(handle);
|
4314
|
+
throw reason;
|
4315
|
+
}
|
4316
|
+
|
4317
|
+
Promise.prototype.timeout = function (ms, message) {
|
4318
|
+
ms = +ms;
|
4319
|
+
var ret = this.then().cancellable();
|
4320
|
+
ret._cancellationParent = this;
|
4321
|
+
var handle = setTimeout(function timeoutTimeout() {
|
4322
|
+
afterTimeout(ret, message);
|
4323
|
+
}, ms);
|
4324
|
+
return ret._then(successClear, failureClear, undefined, handle, undefined);
|
4325
|
+
};
|
4326
|
+
|
4327
|
+
};
|
4328
|
+
|
4329
|
+
},{"./util.js":38}],37:[function(_dereq_,module,exports){
|
4330
|
+
"use strict";
|
4331
|
+
module.exports = function (Promise, apiRejection, tryConvertToPromise,
|
4332
|
+
createContext) {
|
4333
|
+
var TypeError = _dereq_("./errors.js").TypeError;
|
4334
|
+
var inherits = _dereq_("./util.js").inherits;
|
4335
|
+
var PromiseInspection = Promise.PromiseInspection;
|
4336
|
+
|
4337
|
+
function inspectionMapper(inspections) {
|
4338
|
+
var len = inspections.length;
|
4339
|
+
for (var i = 0; i < len; ++i) {
|
4340
|
+
var inspection = inspections[i];
|
4341
|
+
if (inspection.isRejected()) {
|
4342
|
+
return Promise.reject(inspection.error());
|
4343
|
+
}
|
4344
|
+
inspections[i] = inspection._settledValue;
|
4345
|
+
}
|
4346
|
+
return inspections;
|
4347
|
+
}
|
4348
|
+
|
4349
|
+
function thrower(e) {
|
4350
|
+
setTimeout(function(){throw e;}, 0);
|
4351
|
+
}
|
4352
|
+
|
4353
|
+
function castPreservingDisposable(thenable) {
|
4354
|
+
var maybePromise = tryConvertToPromise(thenable);
|
4355
|
+
if (maybePromise !== thenable &&
|
4356
|
+
typeof thenable._isDisposable === "function" &&
|
4357
|
+
typeof thenable._getDisposer === "function" &&
|
4358
|
+
thenable._isDisposable()) {
|
4359
|
+
maybePromise._setDisposable(thenable._getDisposer());
|
4360
|
+
}
|
4361
|
+
return maybePromise;
|
4362
|
+
}
|
4363
|
+
function dispose(resources, inspection) {
|
4364
|
+
var i = 0;
|
4365
|
+
var len = resources.length;
|
4366
|
+
var ret = Promise.defer();
|
4367
|
+
function iterator() {
|
4368
|
+
if (i >= len) return ret.resolve();
|
4369
|
+
var maybePromise = castPreservingDisposable(resources[i++]);
|
4370
|
+
if (maybePromise instanceof Promise &&
|
4371
|
+
maybePromise._isDisposable()) {
|
4372
|
+
try {
|
4373
|
+
maybePromise = tryConvertToPromise(
|
4374
|
+
maybePromise._getDisposer().tryDispose(inspection),
|
4375
|
+
resources.promise);
|
4376
|
+
} catch (e) {
|
4377
|
+
return thrower(e);
|
4378
|
+
}
|
4379
|
+
if (maybePromise instanceof Promise) {
|
4380
|
+
return maybePromise._then(iterator, thrower,
|
4381
|
+
null, null, null);
|
4382
|
+
}
|
4383
|
+
}
|
4384
|
+
iterator();
|
4385
|
+
}
|
4386
|
+
iterator();
|
4387
|
+
return ret.promise;
|
4388
|
+
}
|
4389
|
+
|
4390
|
+
function disposerSuccess(value) {
|
4391
|
+
var inspection = new PromiseInspection();
|
4392
|
+
inspection._settledValue = value;
|
4393
|
+
inspection._bitField = 268435456;
|
4394
|
+
return dispose(this, inspection).thenReturn(value);
|
4395
|
+
}
|
4396
|
+
|
4397
|
+
function disposerFail(reason) {
|
4398
|
+
var inspection = new PromiseInspection();
|
4399
|
+
inspection._settledValue = reason;
|
4400
|
+
inspection._bitField = 134217728;
|
4401
|
+
return dispose(this, inspection).thenThrow(reason);
|
4402
|
+
}
|
4403
|
+
|
4404
|
+
function Disposer(data, promise, context) {
|
4405
|
+
this._data = data;
|
4406
|
+
this._promise = promise;
|
4407
|
+
this._context = context;
|
4408
|
+
}
|
4409
|
+
|
4410
|
+
Disposer.prototype.data = function () {
|
4411
|
+
return this._data;
|
4412
|
+
};
|
4413
|
+
|
4414
|
+
Disposer.prototype.promise = function () {
|
4415
|
+
return this._promise;
|
4416
|
+
};
|
4417
|
+
|
4418
|
+
Disposer.prototype.resource = function () {
|
4419
|
+
if (this.promise().isFulfilled()) {
|
4420
|
+
return this.promise().value();
|
4421
|
+
}
|
4422
|
+
return null;
|
4423
|
+
};
|
4424
|
+
|
4425
|
+
Disposer.prototype.tryDispose = function(inspection) {
|
4426
|
+
var resource = this.resource();
|
4427
|
+
var context = this._context;
|
4428
|
+
if (context !== undefined) context._pushContext();
|
4429
|
+
var ret = resource !== null
|
4430
|
+
? this.doDispose(resource, inspection) : null;
|
4431
|
+
if (context !== undefined) context._popContext();
|
4432
|
+
this._promise._unsetDisposable();
|
4433
|
+
this._data = null;
|
4434
|
+
return ret;
|
4435
|
+
};
|
4436
|
+
|
4437
|
+
Disposer.isDisposer = function (d) {
|
4438
|
+
return (d != null &&
|
4439
|
+
typeof d.resource === "function" &&
|
4440
|
+
typeof d.tryDispose === "function");
|
4441
|
+
};
|
4442
|
+
|
4443
|
+
function FunctionDisposer(fn, promise, context) {
|
4444
|
+
this.constructor$(fn, promise, context);
|
4445
|
+
}
|
4446
|
+
inherits(FunctionDisposer, Disposer);
|
4447
|
+
|
4448
|
+
FunctionDisposer.prototype.doDispose = function (resource, inspection) {
|
4449
|
+
var fn = this.data();
|
4450
|
+
return fn.call(resource, resource, inspection);
|
4451
|
+
};
|
4452
|
+
|
4453
|
+
function maybeUnwrapDisposer(value) {
|
4454
|
+
if (Disposer.isDisposer(value)) {
|
4455
|
+
this.resources[this.index]._setDisposable(value);
|
4456
|
+
return value.promise();
|
4457
|
+
}
|
4458
|
+
return value;
|
4459
|
+
}
|
4460
|
+
|
4461
|
+
Promise.using = function () {
|
4462
|
+
var len = arguments.length;
|
4463
|
+
if (len < 2) return apiRejection(
|
4464
|
+
"you must pass at least 2 arguments to Promise.using");
|
4465
|
+
var fn = arguments[len - 1];
|
4466
|
+
if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a");
|
4467
|
+
len--;
|
4468
|
+
var resources = new Array(len);
|
4469
|
+
for (var i = 0; i < len; ++i) {
|
4470
|
+
var resource = arguments[i];
|
4471
|
+
if (Disposer.isDisposer(resource)) {
|
4472
|
+
var disposer = resource;
|
4473
|
+
resource = resource.promise();
|
4474
|
+
resource._setDisposable(disposer);
|
4475
|
+
} else {
|
4476
|
+
var maybePromise = tryConvertToPromise(resource);
|
4477
|
+
if (maybePromise instanceof Promise) {
|
4478
|
+
resource =
|
4479
|
+
maybePromise._then(maybeUnwrapDisposer, null, null, {
|
4480
|
+
resources: resources,
|
4481
|
+
index: i
|
4482
|
+
}, undefined);
|
4483
|
+
}
|
4484
|
+
}
|
4485
|
+
resources[i] = resource;
|
4486
|
+
}
|
4487
|
+
|
4488
|
+
var promise = Promise.settle(resources)
|
4489
|
+
.then(inspectionMapper)
|
4490
|
+
.then(function(vals) {
|
4491
|
+
promise._pushContext();
|
4492
|
+
var ret;
|
4493
|
+
try {
|
4494
|
+
ret = fn.apply(undefined, vals);
|
4495
|
+
} finally {
|
4496
|
+
promise._popContext();
|
4497
|
+
}
|
4498
|
+
return ret;
|
4499
|
+
})
|
4500
|
+
._then(
|
4501
|
+
disposerSuccess, disposerFail, undefined, resources, undefined);
|
4502
|
+
resources.promise = promise;
|
4503
|
+
return promise;
|
4504
|
+
};
|
4505
|
+
|
4506
|
+
Promise.prototype._setDisposable = function (disposer) {
|
4507
|
+
this._bitField = this._bitField | 262144;
|
4508
|
+
this._disposer = disposer;
|
4509
|
+
};
|
4510
|
+
|
4511
|
+
Promise.prototype._isDisposable = function () {
|
4512
|
+
return (this._bitField & 262144) > 0;
|
4513
|
+
};
|
4514
|
+
|
4515
|
+
Promise.prototype._getDisposer = function () {
|
4516
|
+
return this._disposer;
|
4517
|
+
};
|
4518
|
+
|
4519
|
+
Promise.prototype._unsetDisposable = function () {
|
4520
|
+
this._bitField = this._bitField & (~262144);
|
4521
|
+
this._disposer = undefined;
|
4522
|
+
};
|
4523
|
+
|
4524
|
+
Promise.prototype.disposer = function (fn) {
|
4525
|
+
if (typeof fn === "function") {
|
4526
|
+
return new FunctionDisposer(fn, this, createContext());
|
4527
|
+
}
|
4528
|
+
throw new TypeError();
|
4529
|
+
};
|
4530
|
+
|
4531
|
+
};
|
4532
|
+
|
4533
|
+
},{"./errors.js":13,"./util.js":38}],38:[function(_dereq_,module,exports){
|
4534
|
+
"use strict";
|
4535
|
+
var es5 = _dereq_("./es5.js");
|
4536
|
+
var canEvaluate = typeof navigator == "undefined";
|
4537
|
+
var haveGetters = (function(){
|
4538
|
+
try {
|
4539
|
+
var o = {};
|
4540
|
+
es5.defineProperty(o, "f", {
|
4541
|
+
get: function () {
|
4542
|
+
return 3;
|
4543
|
+
}
|
4544
|
+
});
|
4545
|
+
return o.f === 3;
|
4546
|
+
}
|
4547
|
+
catch (e) {
|
4548
|
+
return false;
|
4549
|
+
}
|
4550
|
+
|
4551
|
+
})();
|
4552
|
+
|
4553
|
+
var errorObj = {e: {}};
|
4554
|
+
var tryCatchTarget;
|
4555
|
+
function tryCatcher() {
|
4556
|
+
try {
|
4557
|
+
var target = tryCatchTarget;
|
4558
|
+
tryCatchTarget = null;
|
4559
|
+
return target.apply(this, arguments);
|
4560
|
+
} catch (e) {
|
4561
|
+
errorObj.e = e;
|
4562
|
+
return errorObj;
|
4563
|
+
}
|
4564
|
+
}
|
4565
|
+
function tryCatch(fn) {
|
4566
|
+
tryCatchTarget = fn;
|
4567
|
+
return tryCatcher;
|
4568
|
+
}
|
4569
|
+
|
4570
|
+
var inherits = function(Child, Parent) {
|
4571
|
+
var hasProp = {}.hasOwnProperty;
|
4572
|
+
|
4573
|
+
function T() {
|
4574
|
+
this.constructor = Child;
|
4575
|
+
this.constructor$ = Parent;
|
4576
|
+
for (var propertyName in Parent.prototype) {
|
4577
|
+
if (hasProp.call(Parent.prototype, propertyName) &&
|
4578
|
+
propertyName.charAt(propertyName.length-1) !== "$"
|
4579
|
+
) {
|
4580
|
+
this[propertyName + "$"] = Parent.prototype[propertyName];
|
4581
|
+
}
|
4582
|
+
}
|
4583
|
+
}
|
4584
|
+
T.prototype = Parent.prototype;
|
4585
|
+
Child.prototype = new T();
|
4586
|
+
return Child.prototype;
|
4587
|
+
};
|
4588
|
+
|
4589
|
+
|
4590
|
+
function isPrimitive(val) {
|
4591
|
+
return val == null || val === true || val === false ||
|
4592
|
+
typeof val === "string" || typeof val === "number";
|
4593
|
+
|
4594
|
+
}
|
4595
|
+
|
4596
|
+
function isObject(value) {
|
4597
|
+
return !isPrimitive(value);
|
4598
|
+
}
|
4599
|
+
|
4600
|
+
function maybeWrapAsError(maybeError) {
|
4601
|
+
if (!isPrimitive(maybeError)) return maybeError;
|
4602
|
+
|
4603
|
+
return new Error(safeToString(maybeError));
|
4604
|
+
}
|
4605
|
+
|
4606
|
+
function withAppended(target, appendee) {
|
4607
|
+
var len = target.length;
|
4608
|
+
var ret = new Array(len + 1);
|
4609
|
+
var i;
|
4610
|
+
for (i = 0; i < len; ++i) {
|
4611
|
+
ret[i] = target[i];
|
4612
|
+
}
|
4613
|
+
ret[i] = appendee;
|
4614
|
+
return ret;
|
4615
|
+
}
|
4616
|
+
|
4617
|
+
function getDataPropertyOrDefault(obj, key, defaultValue) {
|
4618
|
+
if (es5.isES5) {
|
4619
|
+
var desc = Object.getOwnPropertyDescriptor(obj, key);
|
4620
|
+
|
4621
|
+
if (desc != null) {
|
4622
|
+
return desc.get == null && desc.set == null
|
4623
|
+
? desc.value
|
4624
|
+
: defaultValue;
|
4625
|
+
}
|
4626
|
+
} else {
|
4627
|
+
return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined;
|
4628
|
+
}
|
4629
|
+
}
|
4630
|
+
|
4631
|
+
function notEnumerableProp(obj, name, value) {
|
4632
|
+
if (isPrimitive(obj)) return obj;
|
4633
|
+
var descriptor = {
|
4634
|
+
value: value,
|
4635
|
+
configurable: true,
|
4636
|
+
enumerable: false,
|
4637
|
+
writable: true
|
4638
|
+
};
|
4639
|
+
es5.defineProperty(obj, name, descriptor);
|
4640
|
+
return obj;
|
4641
|
+
}
|
4642
|
+
|
4643
|
+
function thrower(r) {
|
4644
|
+
throw r;
|
4645
|
+
}
|
4646
|
+
|
4647
|
+
var inheritedDataKeys = (function() {
|
4648
|
+
var excludedPrototypes = [
|
4649
|
+
Array.prototype,
|
4650
|
+
Object.prototype,
|
4651
|
+
Function.prototype
|
4652
|
+
];
|
4653
|
+
|
4654
|
+
var isExcludedProto = function(val) {
|
4655
|
+
for (var i = 0; i < excludedPrototypes.length; ++i) {
|
4656
|
+
if (excludedPrototypes[i] === val) {
|
4657
|
+
return true;
|
4658
|
+
}
|
4659
|
+
}
|
4660
|
+
return false;
|
4661
|
+
};
|
4662
|
+
|
4663
|
+
if (es5.isES5) {
|
4664
|
+
var getKeys = Object.getOwnPropertyNames;
|
4665
|
+
return function(obj) {
|
4666
|
+
var ret = [];
|
4667
|
+
var visitedKeys = Object.create(null);
|
4668
|
+
while (obj != null && !isExcludedProto(obj)) {
|
4669
|
+
var keys;
|
4670
|
+
try {
|
4671
|
+
keys = getKeys(obj);
|
4672
|
+
} catch (e) {
|
4673
|
+
return ret;
|
4674
|
+
}
|
4675
|
+
for (var i = 0; i < keys.length; ++i) {
|
4676
|
+
var key = keys[i];
|
4677
|
+
if (visitedKeys[key]) continue;
|
4678
|
+
visitedKeys[key] = true;
|
4679
|
+
var desc = Object.getOwnPropertyDescriptor(obj, key);
|
4680
|
+
if (desc != null && desc.get == null && desc.set == null) {
|
4681
|
+
ret.push(key);
|
4682
|
+
}
|
4683
|
+
}
|
4684
|
+
obj = es5.getPrototypeOf(obj);
|
4685
|
+
}
|
4686
|
+
return ret;
|
4687
|
+
};
|
4688
|
+
} else {
|
4689
|
+
var hasProp = {}.hasOwnProperty;
|
4690
|
+
return function(obj) {
|
4691
|
+
if (isExcludedProto(obj)) return [];
|
4692
|
+
var ret = [];
|
4693
|
+
|
4694
|
+
/*jshint forin:false */
|
4695
|
+
enumeration: for (var key in obj) {
|
4696
|
+
if (hasProp.call(obj, key)) {
|
4697
|
+
ret.push(key);
|
4698
|
+
} else {
|
4699
|
+
for (var i = 0; i < excludedPrototypes.length; ++i) {
|
4700
|
+
if (hasProp.call(excludedPrototypes[i], key)) {
|
4701
|
+
continue enumeration;
|
4702
|
+
}
|
4703
|
+
}
|
4704
|
+
ret.push(key);
|
4705
|
+
}
|
4706
|
+
}
|
4707
|
+
return ret;
|
4708
|
+
};
|
4709
|
+
}
|
4710
|
+
|
4711
|
+
})();
|
4712
|
+
|
4713
|
+
var thisAssignmentPattern = /this\s*\.\s*\S+\s*=/;
|
4714
|
+
function isClass(fn) {
|
4715
|
+
try {
|
4716
|
+
if (typeof fn === "function") {
|
4717
|
+
var keys = es5.names(fn.prototype);
|
4718
|
+
|
4719
|
+
var hasMethods = es5.isES5 && keys.length > 1;
|
4720
|
+
var hasMethodsOtherThanConstructor = keys.length > 0 &&
|
4721
|
+
!(keys.length === 1 && keys[0] === "constructor");
|
4722
|
+
var hasThisAssignmentAndStaticMethods =
|
4723
|
+
thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0;
|
4724
|
+
|
4725
|
+
if (hasMethods || hasMethodsOtherThanConstructor ||
|
4726
|
+
hasThisAssignmentAndStaticMethods) {
|
4727
|
+
return true;
|
4728
|
+
}
|
4729
|
+
}
|
4730
|
+
return false;
|
4731
|
+
} catch (e) {
|
4732
|
+
return false;
|
4733
|
+
}
|
4734
|
+
}
|
4735
|
+
|
4736
|
+
function toFastProperties(obj) {
|
4737
|
+
/*jshint -W027,-W055,-W031*/
|
4738
|
+
function f() {}
|
4739
|
+
f.prototype = obj;
|
4740
|
+
var l = 8;
|
4741
|
+
while (l--) new f();
|
4742
|
+
return obj;
|
4743
|
+
eval(obj);
|
4744
|
+
}
|
4745
|
+
|
4746
|
+
var rident = /^[a-z$_][a-z$_0-9]*$/i;
|
4747
|
+
function isIdentifier(str) {
|
4748
|
+
return rident.test(str);
|
4749
|
+
}
|
4750
|
+
|
4751
|
+
function filledRange(count, prefix, suffix) {
|
4752
|
+
var ret = new Array(count);
|
4753
|
+
for(var i = 0; i < count; ++i) {
|
4754
|
+
ret[i] = prefix + i + suffix;
|
4755
|
+
}
|
4756
|
+
return ret;
|
4757
|
+
}
|
4758
|
+
|
4759
|
+
function safeToString(obj) {
|
4760
|
+
try {
|
4761
|
+
return obj + "";
|
4762
|
+
} catch (e) {
|
4763
|
+
return "[no string representation]";
|
4764
|
+
}
|
4765
|
+
}
|
4766
|
+
|
4767
|
+
function markAsOriginatingFromRejection(e) {
|
4768
|
+
try {
|
4769
|
+
notEnumerableProp(e, "isOperational", true);
|
4770
|
+
}
|
4771
|
+
catch(ignore) {}
|
4772
|
+
}
|
4773
|
+
|
4774
|
+
function originatesFromRejection(e) {
|
4775
|
+
if (e == null) return false;
|
4776
|
+
return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) ||
|
4777
|
+
e["isOperational"] === true);
|
4778
|
+
}
|
4779
|
+
|
4780
|
+
function canAttachTrace(obj) {
|
4781
|
+
return obj instanceof Error && es5.propertyIsWritable(obj, "stack");
|
4782
|
+
}
|
4783
|
+
|
4784
|
+
var ensureErrorObject = (function() {
|
4785
|
+
if (!("stack" in new Error())) {
|
4786
|
+
return function(value) {
|
4787
|
+
if (canAttachTrace(value)) return value;
|
4788
|
+
try {throw new Error(safeToString(value));}
|
4789
|
+
catch(err) {return err;}
|
4790
|
+
};
|
4791
|
+
} else {
|
4792
|
+
return function(value) {
|
4793
|
+
if (canAttachTrace(value)) return value;
|
4794
|
+
return new Error(safeToString(value));
|
4795
|
+
};
|
4796
|
+
}
|
4797
|
+
})();
|
4798
|
+
|
4799
|
+
function classString(obj) {
|
4800
|
+
return {}.toString.call(obj);
|
4801
|
+
}
|
4802
|
+
|
4803
|
+
function copyDescriptors(from, to, filter) {
|
4804
|
+
var keys = es5.names(from);
|
4805
|
+
for (var i = 0; i < keys.length; ++i) {
|
4806
|
+
var key = keys[i];
|
4807
|
+
if (filter(key)) {
|
4808
|
+
try {
|
4809
|
+
es5.defineProperty(to, key, es5.getDescriptor(from, key));
|
4810
|
+
} catch (ignore) {}
|
4811
|
+
}
|
4812
|
+
}
|
4813
|
+
}
|
4814
|
+
|
4815
|
+
var ret = {
|
4816
|
+
isClass: isClass,
|
4817
|
+
isIdentifier: isIdentifier,
|
4818
|
+
inheritedDataKeys: inheritedDataKeys,
|
4819
|
+
getDataPropertyOrDefault: getDataPropertyOrDefault,
|
4820
|
+
thrower: thrower,
|
4821
|
+
isArray: es5.isArray,
|
4822
|
+
haveGetters: haveGetters,
|
4823
|
+
notEnumerableProp: notEnumerableProp,
|
4824
|
+
isPrimitive: isPrimitive,
|
4825
|
+
isObject: isObject,
|
4826
|
+
canEvaluate: canEvaluate,
|
4827
|
+
errorObj: errorObj,
|
4828
|
+
tryCatch: tryCatch,
|
4829
|
+
inherits: inherits,
|
4830
|
+
withAppended: withAppended,
|
4831
|
+
maybeWrapAsError: maybeWrapAsError,
|
4832
|
+
toFastProperties: toFastProperties,
|
4833
|
+
filledRange: filledRange,
|
4834
|
+
toString: safeToString,
|
4835
|
+
canAttachTrace: canAttachTrace,
|
4836
|
+
ensureErrorObject: ensureErrorObject,
|
4837
|
+
originatesFromRejection: originatesFromRejection,
|
4838
|
+
markAsOriginatingFromRejection: markAsOriginatingFromRejection,
|
4839
|
+
classString: classString,
|
4840
|
+
copyDescriptors: copyDescriptors,
|
4841
|
+
hasDevTools: typeof chrome !== "undefined" && chrome &&
|
4842
|
+
typeof chrome.loadTimes === "function",
|
4843
|
+
isNode: typeof process !== "undefined" &&
|
4844
|
+
classString(process).toLowerCase() === "[object process]"
|
4845
|
+
};
|
4846
|
+
ret.isRecentNode = ret.isNode && (function() {
|
4847
|
+
var version = process.versions.node.split(".").map(Number);
|
4848
|
+
return (version[0] === 0 && version[1] > 10) || (version[0] > 0);
|
4849
|
+
})();
|
4850
|
+
|
4851
|
+
if (ret.isNode) ret.toFastProperties(process);
|
4852
|
+
|
4853
|
+
try {throw new Error(); } catch (e) {ret.lastLineError = e;}
|
4854
|
+
module.exports = ret;
|
4855
|
+
|
4856
|
+
},{"./es5.js":14}]},{},[4])(4)
|
4857
|
+
}); ;if (typeof window !== 'undefined' && window !== null) { window.P = window.Promise; } else if (typeof self !== 'undefined' && self !== null) { self.P = self.Promise; }
|